initial commit
This commit is contained in:
commit
b8bec4fe7c
Binary file not shown.
|
|
@ -0,0 +1,30 @@
|
|||
drop table entity;
|
||||
|
||||
create table entity(
|
||||
id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
|
||||
creation_ts TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
name varchar(100) NOT NULL,
|
||||
group_p BOOLEAN NOT NULL,
|
||||
geo_offset BIGINT,
|
||||
--private_key VARCHAR(300) NOT NULL,
|
||||
public_key VARCHAR(300) NOT NULL,
|
||||
expiration DATE
|
||||
|
||||
|
||||
);
|
||||
|
||||
drop table group_member;
|
||||
|
||||
create table group_member(
|
||||
group_id INT,
|
||||
person_id INT,
|
||||
role VARCHAR(10),
|
||||
PRIMARY KEY (group_id,person_id)
|
||||
);
|
||||
|
||||
drop table property;
|
||||
|
||||
create table property(
|
||||
id INT NOT NULL,
|
||||
property_name VARCHAR(100)
|
||||
);
|
||||
Binary file not shown.
|
|
@ -0,0 +1,18 @@
|
|||
truncate table entity;
|
||||
truncate table group_member;
|
||||
truncate table property;
|
||||
|
||||
insert into entity (name,group_p,geo_offset,public_key)
|
||||
values
|
||||
('Svend',false,2355,'35AB456' ),
|
||||
('Knud',false,4442,'36546AA'),
|
||||
('Konger',true,3456, '87432CA');
|
||||
|
||||
|
||||
insert into group_member(group_id,person_id)
|
||||
values
|
||||
(3,1);
|
||||
|
||||
insert into property(id,property_name)
|
||||
values
|
||||
(2,'aaa');
|
||||
Loading…
Reference in New Issue