diff --git a/server/migrations/2020-02-07-231841_new_users/up.sql b/server/migrations/2020-02-07-231841_new_users/up.sql index 8b06b4d..18efca9 100644 --- a/server/migrations/2020-02-07-231841_new_users/up.sql +++ b/server/migrations/2020-02-07-231841_new_users/up.sql @@ -1,6 +1,6 @@ -- Used only for those that have been given an invite and are currently using that invite CREATE TABLE IF NOT EXISTS `new_users` ( - `token` bigint NOT NULL, - `invite_id` bigint NOT NULL, + `token` VARCHAR(255) NOT NULL, + `invite_id` bigint UNSIGNED NOT NULL, PRIMARY KEY(`token`) ); \ No newline at end of file diff --git a/server/src/schema.rs b/server/src/schema.rs index 22d1baa..a972767 100644 --- a/server/src/schema.rs +++ b/server/src/schema.rs @@ -6,6 +6,13 @@ table! { } } +table! { + new_users (token) { + token -> Varchar, + invite_id -> Unsigned, + } +} + table! { users (id) { id -> Bigint, @@ -18,5 +25,6 @@ table! { allow_tables_to_appear_in_same_query!( invites, + new_users, users, );