Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Paste
P161
vault schema
Active
Public
Actions
Authored by
seirl
on May 16 2017, 3:54 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
create
table
dbversion
(
version
int
primary
key
,
release
timestamptz
not
null
,
description
text
not
null
);
comment
on
table
dbversion
is
'Schema update tracking'
;
insert
into
dbversion
(
version
,
release
,
description
)
values
(
1
,
now
(),
'Initial version'
);
create
domain
obj_hash
as
bytea
;
create
type
cook_status
as
enum
(
'new'
,
'pending'
,
'done'
);
comment
on
type
cook_status
is
'Status of the cooking'
;
create
table
cook_requests
(
id
bigserial
primary
key
,
type
text
not
null
,
-- requested cooking type
object_id
obj_hash
not
null
,
-- requested object ID
task_uuid
varchar
(
128
)
not
null
,
-- celery UUID of the cooking task
status
cook_status
not
null
-- status of the cooking task
);
create
table
cook_notifications
(
id
bigserial
primary
key
,
email
text
not
null
,
-- e-mail to notify
request_id
bigint
not
null
references
cook_requests
(
id
)
);
Event Timeline
seirl
created this paste.
May 16 2017, 3:54 PM
2017-05-16 15:54:33 (UTC+2)
Log In to Comment