From 1b84375db501f4fd7d73b933a9c6d9178fba8725 Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Tue, 26 Jul 2016 17:22:35 +0200 Subject: [PATCH] Added migrations for team_secrets --- store/datastore/ddl/mysql/7.sql | 19 +++++++++++++++++++ store/datastore/ddl/postgres/7.sql | 19 +++++++++++++++++++ store/datastore/ddl/sqlite3/7.sql | 19 +++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 store/datastore/ddl/mysql/7.sql create mode 100644 store/datastore/ddl/postgres/7.sql create mode 100644 store/datastore/ddl/sqlite3/7.sql diff --git a/store/datastore/ddl/mysql/7.sql b/store/datastore/ddl/mysql/7.sql new file mode 100644 index 00000000..e009572b --- /dev/null +++ b/store/datastore/ddl/mysql/7.sql @@ -0,0 +1,19 @@ +-- +migrate Up + +CREATE TABLE team_secrets ( + team_secret_id INTEGER PRIMARY KEY AUTO_INCREMENT +,team_secret_key VARCHAR(255) +,team_secret_name VARCHAR(255) +,team_secret_value MEDIUMBLOB +,team_secret_images VARCHAR(2000) +,team_secret_events VARCHAR(2000) + +,UNIQUE(team_secret_name, team_secret_key) +); + +CREATE INDEX ix_team_secrets_key ON team_secrets (team_secret_key); + +-- +migrate Down + +DROP INDEX ix_team_secrets_key; +DROP TABLE team_secrets; diff --git a/store/datastore/ddl/postgres/7.sql b/store/datastore/ddl/postgres/7.sql new file mode 100644 index 00000000..225ccb8a --- /dev/null +++ b/store/datastore/ddl/postgres/7.sql @@ -0,0 +1,19 @@ +-- +migrate Up + +CREATE TABLE team_secrets ( + team_secret_id SERIAL PRIMARY KEY +,team_secret_key VARCHAR(255) +,team_secret_name VARCHAR(255) +,team_secret_value BYTEA +,team_secret_images VARCHAR(2000) +,team_secret_events VARCHAR(2000) + +,UNIQUE(team_secret_name, team_secret_key) +); + +CREATE INDEX ix_team_secrets_key ON team_secrets (team_secret_key); + +-- +migrate Down + +DROP INDEX ix_team_secrets_key; +DROP TABLE team_secrets; diff --git a/store/datastore/ddl/sqlite3/7.sql b/store/datastore/ddl/sqlite3/7.sql new file mode 100644 index 00000000..ce3e0514 --- /dev/null +++ b/store/datastore/ddl/sqlite3/7.sql @@ -0,0 +1,19 @@ +-- +migrate Up + +CREATE TABLE team_secrets ( + team_secret_id INTEGER PRIMARY KEY AUTOINCREMENT +,team_secret_key TEXT +,team_secret_name TEXT +,team_secret_value TEXT +,team_secret_images TEXT +,team_secret_events TEXT + +,UNIQUE(team_secret_name, team_secret_key) +); + +CREATE INDEX ix_team_secrets_key ON team_secrets (team_secret_key); + +-- +migrate Down + +DROP INDEX ix_team_secrets_key; +DROP TABLE team_secrets;