diff options
| author | Joel Klinghed <the_jk@spawned.biz> | 2024-12-31 12:24:46 +0100 |
|---|---|---|
| committer | Joel Klinghed <the_jk@spawned.biz> | 2024-12-31 12:24:46 +0100 |
| commit | 4b1f7fec1cf9d427234ff5bded79a6d18d5c88ce (patch) | |
| tree | 2d610e7f37b23193236ca323db4e77aa690b3d1a /server/migrations/eyeballs.sql | |
| parent | 48e199eff5fca8f5e4aa71a4091d3ae7acc82b9b (diff) | |
Rename migration so its actually picked up
Must be <version>_<description>.sql.
Diffstat (limited to 'server/migrations/eyeballs.sql')
| -rw-r--r-- | server/migrations/eyeballs.sql | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/server/migrations/eyeballs.sql b/server/migrations/eyeballs.sql deleted file mode 100644 index aeb1470..0000000 --- a/server/migrations/eyeballs.sql +++ /dev/null @@ -1,67 +0,0 @@ -CREATE TABLE IF NOT EXISTS projects ( - id BIGINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, - title VARCHAR(1024) NOT NULL, - description MEDIUMTEXT NOT NULL DEFAULT '' -); - -CREATE TABLE IF NOT EXISTS users ( - id BIGINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, - username VARCHAR(256) NOT NULL UNIQUE, - name VARCHAR(1024) NOT NULL DEFAULT '', - active BOOLEAN NOT NULL DEFAULT 1 -); - -CREATE TABLE IF NOT EXISTS project_users ( - project BIGINT UNSIGNED NOT NULL, - user BIGINT UNSIGNED NOT NULL, - default_role TINYINT UNSIGNED NOT NULL, - maintainer BOOLEAN NOT NULL DEFAULT 0, - PRIMARY KEY (project, user), - - CONSTRAINT `fk_project_users_project` - FOREIGN KEY (project) REFERENCES projects (id) - ON DELETE CASCADE - ON UPDATE RESTRICT, - - CONSTRAINT `fk_project_users_user` - FOREIGN KEY (user) REFERENCES users (id) - ON DELETE CASCADE - ON UPDATE RESTRICT -); - -CREATE TABLE IF NOT EXISTS reviews ( - id BIGINT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, - project BIGINT UNSIGNED NOT NULL, - owner BIGINT UNSIGNED NOT NULL, - title VARCHAR(1024) NOT NULL, - description MEDIUMTEXT NOT NULL DEFAULT '', - state TINYINT UNSIGNED NOT NULL DEFAULT 0, - progress FLOAT NOT NULL DEFAULT 0, - - CONSTRAINT `fk_reviews_project` - FOREIGN KEY (project) REFERENCES projects (id) - ON DELETE CASCADE - ON UPDATE RESTRICT, - - CONSTRAINT `fk_reviews_owner` - FOREIGN KEY (owner) REFERENCES users (id) - ON DELETE CASCADE - ON UPDATE RESTRICT -); - -CREATE TABLE IF NOT EXISTS review_users ( - review BIGINT UNSIGNED NOT NULL, - user BIGINT UNSIGNED NOT NULL, - role TINYINT UNSIGNED NOT NULL DEFAULT 0, - PRIMARY KEY (review, user), - - CONSTRAINT `fk_review_users_review` - FOREIGN KEY (review) REFERENCES reviews (id) - ON DELETE CASCADE - ON UPDATE RESTRICT, - - CONSTRAINT `fk_review_users_user` - FOREIGN KEY (user) REFERENCES users (id) - ON DELETE CASCADE - ON UPDATE RESTRICT -); |
