Automatically create control table if it doesn't exists

This commit is contained in:
Rikard Bartholf
2016-02-17 15:11:11 +01:00
parent 375c521e17
commit 2c5c2d2034
2 changed files with 11 additions and 11 deletions
-11
View File
@@ -58,17 +58,6 @@ alter table users
add email varchar(256) not null;
```
#### Prerequisites
One table needs to be created for the database to make this work:
```
CREATE TABLE database_versions (
version varchar(32) not null,
is_active boolean not null default false,
creation_date timestamp not null default current_timestamp
);
```
To do the actual migration, then just run:
```
# ./db-upgrade [ENVIRONMENT NAME]