🏡 index : ~doyle/chartered.git

author Jordan Doyle <jordan@doyle.la> 2021-09-21 3:24:18.0 +01:00:00
committer Jordan Doyle <jordan@doyle.la> 2021-09-21 3:24:18.0 +01:00:00
commit
ecf8148080618cc52f47f74d3675a13a169d9701 [patch]
tree
4112d9615838ebd968926d5b32e9ca47ebf83d83
parent
058e4ce26eaab5e83104e83585551e7e54841c05
download
ecf8148080618cc52f47f74d3675a13a169d9701.tar.gz

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(-)

diff --git a/migrations/2021-08-31-214501_create_crates_table/down.sql b/migrations/2021-08-31-214501_create_crates_table/down.sql
index 183c37f..cefd3da 100644
--- a/migrations/2021-08-31-214501_create_crates_table/down.sql
+++ a/migrations/2021-08-31-214501_create_crates_table/down.sql
@@ -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;
diff --git a/migrations/2021-08-31-214501_create_crates_table/up.sql b/migrations/2021-08-31-214501_create_crates_table/up.sql
index 0b4d1e0..12b2538 100644
--- a/migrations/2021-08-31-214501_create_crates_table/up.sql
+++ a/migrations/2021-08-31-214501_create_crates_table/up.sql
@@ -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,