diff options
| author | Kevin J Hoerr <kjhoerr@protonmail.com> | 2018-08-26 22:04:41 -0400 |
|---|---|---|
| committer | Kevin Hoerr <kjhoerr@submelon.tech> | 2018-08-31 23:24:45 -0400 |
| commit | 396f302937cc83c8cb50e4bba64b67f4b76b7c13 (patch) | |
| tree | 9e8231fb54f4796384bdd0e914208e2d0da5fa28 /src/schema.rs | |
| parent | d4e8221b4fa44b6bf2d598b702d995ea79dfa24e (diff) | |
| download | august-offensive-396f302937cc83c8cb50e4bba64b67f4b76b7c13.tar.gz august-offensive-396f302937cc83c8cb50e4bba64b67f4b76b7c13.tar.bz2 august-offensive-396f302937cc83c8cb50e4bba64b67f4b76b7c13.zip | |
Add Diesel schema and initial migration SQL files
Diffstat (limited to 'src/schema.rs')
| -rw-r--r-- | src/schema.rs | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/src/schema.rs b/src/schema.rs new file mode 100644 index 0000000..2f0daba --- /dev/null +++ b/src/schema.rs @@ -0,0 +1,66 @@ +table! { + users(userid) { + userid -> Serial, + email -> VarChar, + firstname -> VarChar, + lastname -> VarChar, + password -> VarChar, + joindate -> Date, + activated -> Bool, + } +} +table! { + activation_keys(code) { + code -> VarChar, + userid -> Serial, + } +} +table! { + games(gameid) { + gameid -> Serial, + title -> VarChar, + gametypeid -> Serial, + players -> SmallInt, + waitfor -> Integer, + lastturn -> Date, + gamestate -> Integer, + } +} +table! { + allegiances(gameid, userid) { + gameid -> Serial, + userid -> Serial, + allegiance -> VarChar, + ordernum -> SmallInt, + playing -> SmallInt, + } +} +table! { + regions(regionid) { + regionid -> Serial, + name -> VarChar, + abbreviation -> Char, + bonus -> Integer, + } +} +table! { + nationstates(nationid) { + nationid -> Serial, + regionid -> Serial, + name -> VarChar, + abbreviation -> Char, + } +} +table! { + borders(nationid, borderid) { + nationid -> Serial, + borderid -> Serial, + } +} +table! { + regions_nationstates(gameid, nationid) { + gameid -> Serial, + nationid -> Serial, + userid -> Serial, + } +}
\ No newline at end of file |
