From 1c6d7eb38059b4777c5ad1da9e0f1b9aab8b2e18 Mon Sep 17 00:00:00 2001 From: forest Date: Mon, 15 Feb 2021 17:52:31 -0600 Subject: [PATCH] eclipse failed to add deleted files --- .../09_down_introduce_hosts.sql | 11 ------- .../09_up_introduce_hosts.sql | 32 ------------------- 2 files changed, 43 deletions(-) delete mode 100644 capsulflask/schema_migrations/09_down_introduce_hosts.sql delete mode 100644 capsulflask/schema_migrations/09_up_introduce_hosts.sql diff --git a/capsulflask/schema_migrations/09_down_introduce_hosts.sql b/capsulflask/schema_migrations/09_down_introduce_hosts.sql deleted file mode 100644 index d2b4343..0000000 --- a/capsulflask/schema_migrations/09_down_introduce_hosts.sql +++ /dev/null @@ -1,11 +0,0 @@ - -DROP TABLE host_operation; - -DROP TABLE operations; - -ALTER TABLE vms DROP COLUMN host; - -DROP TABLE hosts; - - -UPDATE schemaversion SET version = 8; \ No newline at end of file diff --git a/capsulflask/schema_migrations/09_up_introduce_hosts.sql b/capsulflask/schema_migrations/09_up_introduce_hosts.sql deleted file mode 100644 index 2f6628c..0000000 --- a/capsulflask/schema_migrations/09_up_introduce_hosts.sql +++ /dev/null @@ -1,32 +0,0 @@ - - -CREATE TABLE hosts ( - id TEXT PRIMARY KEY NOT NULL, - last_health_check TIMESTAMP NOT NULL DEFAULT NOW(), - https_url TEXT NOT NULL, - token TEXT NOT NULL -); - -INSERT INTO hosts (id, https_url, token) VALUES ('baikal', 'http://localhost:5000', 'changeme'); - -ALTER TABLE vms -ADD COLUMN host TEXT REFERENCES hosts(id) ON DELETE RESTRICT DEFAULT 'baikal'; - -CREATE TABLE operations ( - id SERIAL PRIMARY KEY , - email TEXT REFERENCES accounts(email) ON DELETE RESTRICT, - created TIMESTAMP NOT NULL DEFAULT NOW(), - payload TEXT NOT NULL -); - -CREATE TABLE host_operation ( - host TEXT NOT NULL REFERENCES hosts(id) ON DELETE RESTRICT, - operation INTEGER NOT NULL REFERENCES operations(id) ON DELETE RESTRICT, - assignment_status TEXT NULL, - assigned TIMESTAMP NULL, - completed TIMESTAMP NULL, - results TEXT NULL, - PRIMARY KEY (host, operation) -); - -UPDATE schemaversion SET version = 9;