diff --git a/controller/store/sql/postgresql/012_v0_4_0_update_account_request.sql b/controller/store/sql/postgresql/012_v0_4_0_update_account_request.sql new file mode 100644 index 00000000..3e308cb1 --- /dev/null +++ b/controller/store/sql/postgresql/012_v0_4_0_update_account_request.sql @@ -0,0 +1,3 @@ +-- +migrate Up + +ALTER TABLE account_requests DROP CONSTRAINT account_requests_email_key; \ No newline at end of file diff --git a/controller/store/sql/sqlite3/012_v0_4_0_update_account_request.sql b/controller/store/sql/sqlite3/012_v0_4_0_update_account_request.sql new file mode 100644 index 00000000..c1544b63 --- /dev/null +++ b/controller/store/sql/sqlite3/012_v0_4_0_update_account_request.sql @@ -0,0 +1,15 @@ +-- +migrate Up + +alter table account_requests rename to account_requests_old; +create table account_requests ( + id integer primary key, + token string not null unique, + email string not null, + source_address string not null, + created_at datetime not null default(strftime('%Y-%m-%d %H:%M:%f', 'now')), + updated_at datetime not null default(strftime('%Y-%m-%d %H:%M:%f', 'now')), + deleted boolean not null default(false) +); + +insert into account_requests select * from account_requests_old; +drop table account_requests_old; \ No newline at end of file