diff --git a/server/migrations/2020-02-04-083551_users/down.sql b/server/migrations/2020-02-04-083551_users/down.sql deleted file mode 100644 index 6dbfc46..0000000 --- a/server/migrations/2020-02-04-083551_users/down.sql +++ /dev/null @@ -1,2 +0,0 @@ --- This file should undo anything in `up.sql` -DROP TABLE `users`; diff --git a/server/migrations/2020-02-04-083551_users/up.sql b/server/migrations/2020-02-04-083551_users/up.sql deleted file mode 100644 index ac2f664..0000000 --- a/server/migrations/2020-02-04-083551_users/up.sql +++ /dev/null @@ -1,12 +0,0 @@ --- id: simple id tracking users --- name: default name that users have to display --- date: date that they signed up --- status: online/offline/away etc. - -CREATE TABLE IF NOT EXISTS `users` ( - `id` bigint UNSIGNED NOT NULL auto_increment, - `name` varchar(255) NOT NULL, - `date` bigint UNSIGNED NOT NULL, - `status` integer NOT NULL, - PRIMARY KEY( `id` ) -); \ No newline at end of file diff --git a/server/migrations/2020-06-02-055256_keys/up.sql b/server/migrations/2020-06-02-055256_keys/up.sql index e4720ed..94d9be7 100644 --- a/server/migrations/2020-06-02-055256_keys/up.sql +++ b/server/migrations/2020-06-02-055256_keys/up.sql @@ -8,5 +8,5 @@ CREATE TABLE IF NOT EXISTS `keys`( `uses` integer, `userid` bigint unsigned NOT NULL, PRIMARY KEY(`secret`), - FOREIGN KEY `userid` REFERENCES users(`id`) -); \ No newline at end of file + FOREIGN KEY (`userid`) REFERENCES members(`id`) +); diff --git a/server/migrations/2020-07-05-215114_members/down.sql b/server/migrations/2020-07-05-215114_members/down.sql new file mode 100644 index 0000000..9f96d46 --- /dev/null +++ b/server/migrations/2020-07-05-215114_members/down.sql @@ -0,0 +1 @@ +DROP TABLE `members`; diff --git a/server/migrations/2020-07-05-215114_members/up.sql b/server/migrations/2020-07-05-215114_members/up.sql new file mode 100644 index 0000000..1e89ddd --- /dev/null +++ b/server/migrations/2020-07-05-215114_members/up.sql @@ -0,0 +1,7 @@ +CREATE TABLE IF NOT EXISTS `members`( + `id` bigint UNSIGNED NOT NULL auto_increment, + `name` varchar(255) NOT NULL, + `joindate` bigint UNSIGNED NOT NULL, + `status` integer NOT NULL, + PRIMARY KEY( `id` ) +);