Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
Wichtelbot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dnns01
Wichtelbot
Commits
f576615b
Commit
f576615b
authored
3 years ago
by
Benedikt Magnus
Browse files
Options
Downloads
Patches
Plain Diff
Switched from tab to space indentation in SQL files for consistency.
parent
ddd3a6f5
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
data/log.sql
+5
-5
5 additions, 5 deletions
data/log.sql
data/main.sql
+46
-46
46 additions, 46 deletions
data/main.sql
with
51 additions
and
51 deletions
data/log.sql
+
5
−
5
View file @
f576615b
BEGIN
TRANSACTION
;
CREATE
TABLE
`log`
(
`contactId`
TEXT
,
`name`
TEXT
,
`timestamp`
INTEGER
,
`channelId`
TEXT
,
`message`
TEXT
`contactId`
TEXT
,
`name`
TEXT
,
`timestamp`
INTEGER
,
`channelId`
TEXT
,
`message`
TEXT
);
COMMIT
;
This diff is collapsed.
Click to expand it.
data/main.sql
+
46
−
46
View file @
f576615b
BEGIN
TRANSACTION
;
CREATE
TABLE
`contact`
(
`id`
TEXT
NOT
NULL
UNIQUE
,
`tag`
TEXT
NOT
NULL
UNIQUE
,
`name`
TEXT
NOT
NULL
UNIQUE
,
`nickname`
TEXT
NOT
NULL
UNIQUE
,
`lastUpdateTime`
INTEGER
NOT
NULL
DEFAULT
0
,
`type`
TEXT
NOT
NULL
,
`state`
TEXT
NOT
NULL
,
PRIMARY
KEY
(
`id`
)
`id`
TEXT
NOT
NULL
UNIQUE
,
`tag`
TEXT
NOT
NULL
UNIQUE
,
`name`
TEXT
NOT
NULL
UNIQUE
,
`nickname`
TEXT
NOT
NULL
UNIQUE
,
`lastUpdateTime`
INTEGER
NOT
NULL
DEFAULT
0
,
`type`
TEXT
NOT
NULL
,
`state`
TEXT
NOT
NULL
,
PRIMARY
KEY
(
`id`
)
)
WITHOUT
ROWID
;
CREATE
TABLE
`superuser`
(
`contactId`
TEXT
NOT
NULL
UNIQUE
,
`role`
TEXT
NOT
NULL
,
PRIMARY
KEY
(
`contactId`
),
FOREIGN
KEY
(
`contactId`
)
REFERENCES
`contact`
(
`id`
)
`contactId`
TEXT
NOT
NULL
UNIQUE
,
`role`
TEXT
NOT
NULL
,
PRIMARY
KEY
(
`contactId`
),
FOREIGN
KEY
(
`contactId`
)
REFERENCES
`contact`
(
`id`
)
)
WITHOUT
ROWID
;
CREATE
TABLE
`relationship`
(
`wichtelEvent`
TEXT
NOT
NULL
,
`giverId`
TEXT
NOT
NULL
,
`takerId`
TEXT
NOT
NULL
,
FOREIGN
KEY
(
`takerId`
)
REFERENCES
`contact`
(
`id`
),
FOREIGN
KEY
(
`giverId`
)
REFERENCES
`contact`
(
`id`
)
`wichtelEvent`
TEXT
NOT
NULL
,
`giverId`
TEXT
NOT
NULL
,
`takerId`
TEXT
NOT
NULL
,
FOREIGN
KEY
(
`takerId`
)
REFERENCES
`contact`
(
`id`
),
FOREIGN
KEY
(
`giverId`
)
REFERENCES
`contact`
(
`id`
)
);
CREATE
TABLE
`information`
(
`contactId`
TEXT
NOT
NULL
UNIQUE
,
`lastUpdateTime`
INTEGER
NOT
NULL
DEFAULT
0
,
`giftTypeAsTaker`
TEXT
NOT
NULL
DEFAULT
''
,
`giftTypeAsGiver`
TEXT
NOT
NULL
DEFAULT
''
,
`address`
TEXT
NOT
NULL
DEFAULT
''
,
`country`
TEXT
NOT
NULL
DEFAULT
''
,
`digitalAddress`
TEXT
NOT
NULL
DEFAULT
''
,
`internationalAllowed`
INTEGER
NOT
NULL
DEFAULT
0
,
`wishList`
TEXT
NOT
NULL
DEFAULT
''
,
`allergies`
TEXT
NOT
NULL
DEFAULT
''
,
`giftExclusion`
TEXT
NOT
NULL
DEFAULT
''
,
`userExclusion`
TEXT
NOT
NULL
DEFAULT
''
,
`freeText`
TEXT
NOT
NULL
DEFAULT
''
,
PRIMARY
KEY
(
`contactId`
),
FOREIGN
KEY
(
`contactId`
)
REFERENCES
`contact`
(
`id`
)
`contactId`
TEXT
NOT
NULL
UNIQUE
,
`lastUpdateTime`
INTEGER
NOT
NULL
DEFAULT
0
,
`giftTypeAsTaker`
TEXT
NOT
NULL
DEFAULT
''
,
`giftTypeAsGiver`
TEXT
NOT
NULL
DEFAULT
''
,
`address`
TEXT
NOT
NULL
DEFAULT
''
,
`country`
TEXT
NOT
NULL
DEFAULT
''
,
`digitalAddress`
TEXT
NOT
NULL
DEFAULT
''
,
`internationalAllowed`
INTEGER
NOT
NULL
DEFAULT
0
,
`wishList`
TEXT
NOT
NULL
DEFAULT
''
,
`allergies`
TEXT
NOT
NULL
DEFAULT
''
,
`giftExclusion`
TEXT
NOT
NULL
DEFAULT
''
,
`userExclusion`
TEXT
NOT
NULL
DEFAULT
''
,
`freeText`
TEXT
NOT
NULL
DEFAULT
''
,
PRIMARY
KEY
(
`contactId`
),
FOREIGN
KEY
(
`contactId`
)
REFERENCES
`contact`
(
`id`
)
)
WITHOUT
ROWID
;
CREATE
TABLE
`exclusion`
(
`giverId`
TEXT
NOT
NULL
,
`takerId`
TEXT
NOT
NULL
,
`reason`
TEXT
NOT
NULL
,
`lastUpdateTime`
INTEGER
NOT
NULL
DEFAULT
0
,
FOREIGN
KEY
(
`takerId`
)
REFERENCES
`contact`
(
`id`
),
FOREIGN
KEY
(
`giverId`
)
REFERENCES
`contact`
(
`id`
)
`giverId`
TEXT
NOT
NULL
,
`takerId`
TEXT
NOT
NULL
,
`reason`
TEXT
NOT
NULL
,
`lastUpdateTime`
INTEGER
NOT
NULL
DEFAULT
0
,
FOREIGN
KEY
(
`takerId`
)
REFERENCES
`contact`
(
`id`
),
FOREIGN
KEY
(
`giverId`
)
REFERENCES
`contact`
(
`id`
)
);
CREATE
TABLE
`parcel`
(
`wichtelEvent`
TEXT
NOT
NULL
,
`senderId`
TEXT
NOT
NULL
,
`recipientId`
TEXT
NOT
NULL
,
`consignmentNumber`
TEXT
NOT
NULL
DEFAULT
''
,
`shippingDate`
TEXT
NOT
NULL
DEFAULT
''
,
`receivingDate`
TEXT
NOT
NULL
DEFAULT
''
,
FOREIGN
KEY
(
`senderId`
)
REFERENCES
`contact`
(
`id`
),
FOREIGN
KEY
(
`recipientId`
)
REFERENCES
`contact`
(
`id`
)
`wichtelEvent`
TEXT
NOT
NULL
,
`senderId`
TEXT
NOT
NULL
,
`recipientId`
TEXT
NOT
NULL
,
`consignmentNumber`
TEXT
NOT
NULL
DEFAULT
''
,
`shippingDate`
TEXT
NOT
NULL
DEFAULT
''
,
`receivingDate`
TEXT
NOT
NULL
DEFAULT
''
,
FOREIGN
KEY
(
`senderId`
)
REFERENCES
`contact`
(
`id`
),
FOREIGN
KEY
(
`recipientId`
)
REFERENCES
`contact`
(
`id`
)
);
CREATE
UNIQUE
INDEX
`relationshipTaker`
ON
`relationship`
(
`wichtelEvent`
,
`takerId`
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment