1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

Added doc to fix migrations table

This commit is contained in:
ivaosthu 2016-12-23 10:35:02 +01:00 committed by Ivar Conradi Østhus
parent be7f4784cd
commit 29da6be0f4
2 changed files with 24 additions and 0 deletions

15
docs/migration-guide.md Normal file
View File

@ -0,0 +1,15 @@
# Migrations guide
## Upgrading from v1.0 to 2.0
### Cavat 1: Not used db-migrate to migrate the unleash database
In FINN we used, for internal reasons, liquebase to migrate our database.
Because unleash from version 2.0 migrates the datbase internally, with db-migrate,
you need to make sure that all previous migrations for version 1 exists, so unleash
does not try to create tables that already exists.
#### How to check?
If you don't a "migrations" table with _7 unique migrations_ you are affected by this cavat.
#### How to fix?
Before starting unleash version 2 you have to run the SQL located under `scripts/fix-migrations-version-1.sql`

View File

@ -0,0 +1,9 @@
CREATE TABLE migrations ( id SERIAL NOT NULL, name CHARACTER VARYING(255) NOT NULL, run_on TIMESTAMP(6) WITHOUT TIME ZONE NOT NULL, PRIMARY KEY (id) );
insert into migrations (id, name, run_on) values (1, '/20141020151056-initial-schema', '2016-12-23 10:08:28');
insert into migrations (id, name, run_on) values (2, '/20141110144153-add-description-to-features', '2016-12-23 10:08:31');
insert into migrations (id, name, run_on) values (3, '/20141117200435-add-parameters-template-to-strategies', '2016-12-23 10:08:32');
insert into migrations (id, name, run_on) values (4, '/20141117202209-insert-default-strategy', '2016-12-23 10:08:36');
insert into migrations (id, name, run_on) values (5, '/20141118071458-default-strategy-event', '2016-12-23 10:10:35');
insert into migrations (id, name, run_on) values (6, '/20141215210141-005-archived-flag-to-features', '2016-12-23 10:10:39');
insert into migrations (id, name, run_on) values (7, '/20150210152531-006-rename-eventtype', '2016-12-23 10:10:48');
ALTER SEQUENCE migrations_id_seq restart 8