From 2bc0fb3049e6de3e9aaa8b7c85dc9e8789bc3b24 Mon Sep 17 00:00:00 2001 From: DmitryZagorulko Date: Fri, 18 May 2018 13:22:27 +0300 Subject: [PATCH] add migrations --- migrations/1525942800_app.down.sql | 2 +- migrations/1525942800_app.up.sql | 1 - migrations/1525944630_app.up.sql | 1 - migrations/1526308450_app.down.sql | 2 +- migrations/1526308450_app.up.sql | 1 - migrations/1526636120_app.down.sql | 11 +++++++++++ migrations/1526636120_app.up.sql | 11 +++++++++++ 7 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 migrations/1526636120_app.down.sql create mode 100644 migrations/1526636120_app.up.sql diff --git a/migrations/1525942800_app.down.sql b/migrations/1525942800_app.down.sql index 35afd48..84e702a 100644 --- a/migrations/1525942800_app.down.sql +++ b/migrations/1525942800_app.down.sql @@ -1 +1 @@ -DROP TABLE connection; \ No newline at end of file +DROP TABLE connection; diff --git a/migrations/1525942800_app.up.sql b/migrations/1525942800_app.up.sql index dc72482..eb37a0a 100644 --- a/migrations/1525942800_app.up.sql +++ b/migrations/1525942800_app.up.sql @@ -12,4 +12,3 @@ create table connection updated_at timestamp with time zone, active boolean ); - diff --git a/migrations/1525944630_app.up.sql b/migrations/1525944630_app.up.sql index 9dba83a..b2db243 100644 --- a/migrations/1525944630_app.up.sql +++ b/migrations/1525944630_app.up.sql @@ -11,4 +11,3 @@ create table bot updated_at timestamp with time zone, active boolean ); - diff --git a/migrations/1526308450_app.down.sql b/migrations/1526308450_app.down.sql index c8f5021..30a630e 100644 --- a/migrations/1526308450_app.down.sql +++ b/migrations/1526308450_app.down.sql @@ -1 +1 @@ -DROP TABLE mapping; \ No newline at end of file +DROP TABLE mapping; diff --git a/migrations/1526308450_app.up.sql b/migrations/1526308450_app.up.sql index 8f12e41..1a03523 100644 --- a/migrations/1526308450_app.up.sql +++ b/migrations/1526308450_app.up.sql @@ -6,4 +6,3 @@ create table mapping site_code text, bot_id text ); - diff --git a/migrations/1526636120_app.down.sql b/migrations/1526636120_app.down.sql new file mode 100644 index 0000000..31551a5 --- /dev/null +++ b/migrations/1526636120_app.down.sql @@ -0,0 +1,11 @@ +alter table connection + alter column client_id type text, + alter column api_key type text, + alter column api_url type text, + alter column mg_url type text, + alter column mg_token type text; + +alter table bot + alter column client_id type text, + alter column name type text, + alter column token type text; diff --git a/migrations/1526636120_app.up.sql b/migrations/1526636120_app.up.sql new file mode 100644 index 0000000..3a64f45 --- /dev/null +++ b/migrations/1526636120_app.up.sql @@ -0,0 +1,11 @@ +alter table connection + alter column client_id type varchar(70), + alter column api_key type varchar(100), + alter column api_url type varchar(100), + alter column mg_url type varchar(100), + alter column mg_token type varchar(100); + +alter table bot + alter column client_id type varchar(70), + alter column name type varchar(40), + alter column token type varchar(100);