diff --git a/storage/sql_migrations/003_did.sql b/storage/sql_migrations/003_did.sql index 1c0632050..5263d200f 100644 --- a/storage/sql_migrations/003_did.sql +++ b/storage/sql_migrations/003_did.sql @@ -16,10 +16,10 @@ create table did_document_version -- id is v4 uuid id varchar(36) not null primary key, did varchar(370) not null, - created_at integer, -- make not nil in future PR - updated_at integer, -- make not nil in future PR + created_at integer not null, + updated_at integer not null, version int not null, - raw $TEXT_TYPE, -- make not nil in future PR + raw $TEXT_TYPE not null, unique (did, version), foreign key (did) references did (id) on delete cascade ); @@ -102,7 +102,9 @@ create table did_document_to_service ); -- +goose Down +drop table did_document_to_verification_method; drop table did_verification_method; +drop table did_document_to_service; drop table did_service; drop table did_change_log; drop table did_document_version;