Reorder migrations
Diff
migrations/2021-08-31-214501_create_crates_table/down.sql | 2 +-
migrations/2021-08-31-214501_create_crates_table/up.sql | 16 +++++++++-------
2 files changed, 9 insertions(+), 9 deletions(-)
@@ -1,7 +1,7 @@
DROP TABLE organisations;
DROP TABLE users;
DROP TABLE crates;
DROP TABLE crate_versions;
DROP TABLE users;
DROP TABLE user_organisation_permissions;
DROP TABLE user_crate_permissions;
DROP TABLE user_ssh_keys;
@@ -1,3 +1,11 @@
CREATE TABLE users (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
uuid BINARY(128) NOT NULL UNIQUE,
username VARCHAR(255) NOT NULL UNIQUE
);
INSERT INTO users (id, uuid, username) VALUES (1, X'936DA01F9ABD4D9D80C702AF85C822A8', "admin");
CREATE TABLE organisations (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
uuid BINARY(128) NOT NULL UNIQUE,
@@ -36,14 +44,6 @@
FOREIGN KEY (user_id) REFERENCES users (id)
FOREIGN KEY (crate_id) REFERENCES crates (id)
);
CREATE TABLE users (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
uuid BINARY(128) NOT NULL UNIQUE,
username VARCHAR(255) NOT NULL UNIQUE
);
INSERT INTO users (id, uuid, username) VALUES (1, X'936DA01F9ABD4D9D80C702AF85C822A8', "admin");
CREATE TABLE user_organisation_permissions (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,