From d38909831c2f5db10d5552265321e6c642a90212 Mon Sep 17 00:00:00 2001 From: Joel Speed Date: Thu, 15 Feb 2018 10:02:03 +0000 Subject: [PATCH] Fix migration in SQL connector I didn't realise quite what the migration mechanism was. Have understood it now. --- storage/sql/migrate.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/storage/sql/migrate.go b/storage/sql/migrate.go index bce8e5cf..ecf1ae77 100644 --- a/storage/sql/migrate.go +++ b/storage/sql/migrate.go @@ -100,6 +100,7 @@ var migrations = []migration{ claims_groups bytea not null, -- JSON array of strings connector_id text not null, + connector_data bytea, expiry timestamptz not null );`, @@ -118,6 +119,7 @@ var migrations = []migration{ claims_groups bytea not null, -- JSON array of strings connector_id text not null, + connector_data bytea, expiry timestamptz not null );`, @@ -134,7 +136,8 @@ var migrations = []migration{ claims_email_verified boolean not null, claims_groups bytea not null, -- JSON array of strings - connector_id text not null + connector_id text not null, + connector_data bytea );`, ` create table password ( @@ -172,7 +175,6 @@ var migrations = []migration{ user_id text not null, conn_id text not null, refresh bytea not null, - connector_data bytea not null, PRIMARY KEY (user_id, conn_id) );`, }, @@ -200,4 +202,11 @@ var migrations = []migration{ add column claims_preferred_username text not null default '';`, }, }, + { + stmts: []string{` + alter table offline_session + add column connector_data bytea not null default ''; + `, + }, + }, }