From c8cb2f8481fe3ad079178021ed989588339be5fb Mon Sep 17 00:00:00 2001 From: Daniel Jiang Date: Fri, 12 Oct 2018 17:17:31 +0800 Subject: [PATCH] Create shcema migration table in DB container The migrate tool will try to create table schema_migration upon opening the connection to DB. This will cause error when there are multiple instance of adminserver trying to access the migrator upon start. This commit move the creation of the table during the initialization of the DB container. Signed-off-by: Daniel Jiang --- make/photon/db/initial-registry.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/make/photon/db/initial-registry.sql b/make/photon/db/initial-registry.sql index b903c7b21..36e141d89 100644 --- a/make/photon/db/initial-registry.sql +++ b/make/photon/db/initial-registry.sql @@ -1,2 +1,4 @@ CREATE DATABASE registry ENCODING 'UTF8'; +\c registry; +CREATE TABLE schema_migrations(version bigint not null primary key, dirty boolean not null); \ No newline at end of file