-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init.sql
More file actions
6 lines (6 loc) · 867 Bytes
/
__init.sql
File metadata and controls
6 lines (6 loc) · 867 Bytes
1
2
3
4
5
6
create table instance_object (id bigserial not null, created_at timestamp not null, instance_object_collection_id int8, primary key (id));
create table instance_object_value_per_key (instance_object_id int8 not null, value text, key varchar(255) not null, primary key (instance_object_id, key));
create table instance_object_collection (id bigserial not null, instance_object_id int8, key varchar(255), primary key (id));
alter table instance_object add constraint FKp6f8ogjmuv3trkdxfp1eb7so0 foreign key (instance_object_collection_id) references instance_object_collection;
alter table instance_object_value_per_key add constraint FKjw2gv69q6faqejinh37u6te94 foreign key (instance_object_id) references instance_object;
alter table instance_object_collection add constraint FK7bq0pdfgejo5hxcakb3vxq079 foreign key (instance_object_id) references instance_object;