This repository has been archived by the owner on Apr 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsecretshare.dbm
69 lines (63 loc) · 2.38 KB
/
secretshare.dbm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?xml version="1.0" encoding="UTF-8"?>
<!--
CAUTION: Do not modify this file unless you know what you are doing.
Unexpected results may occur if the code is changed deliberately.
-->
<dbmodel pgmodeler-ver="0.9.2-alpha1" last-position="0,0" last-zoom="1" max-obj-count="4"
default-schema="public" default-owner="postgres">
<database name="secretshare" is-template="false" allow-conns="true">
</database>
<schema name="public" layer="0" fill-color="#e1e1e1" sql-disabled="true">
</schema>
<table name="secrets" layer="0" collapse-mode="2" max-obj-count="4">
<schema name="public"/>
<role name="postgres"/>
<position x="240" y="300"/>
<column name="id" not-null="true">
<type name="varchar" length="6"/>
<comment><![CDATA[6 character length uuid]]></comment>
</column>
<column name="data" not-null="true">
<type name="text" length="0"/>
<comment><![CDATA[AES encrypted version of the secret]]></comment>
</column>
<column name="created" not-null="true" default-value="now()">
<type name="timestamp" length="0"/>
</column>
<column name="expires" not-null="true">
<type name="timestamp" length="0"/>
</column>
<constraint name="pk_secret_id" type="pk-constr" table="public.secrets">
<columns names="id" ref-type="src-columns"/>
</constraint>
</table>
<table name="access" layer="0" collapse-mode="2" max-obj-count="4">
<schema name="public"/>
<role name="postgres"/>
<position x="600" y="300"/>
<column name="id" not-null="true">
<type name="serial" length="0"/>
</column>
<column name="ip" not-null="true">
<type name="varchar" length="45"/>
</column>
<column name="time" not-null="true" default-value="now()">
<type name="timestamp" length="0"/>
</column>
<column name="secret" not-null="true">
<type name="varchar" length="6"/>
</column>
<constraint name="pk_access_id" type="pk-constr" table="public.access">
<columns names="id" ref-type="src-columns"/>
</constraint>
</table>
<constraint name="fk_access_secret" type="fk-constr" comparison-type="MATCH FULL"
upd-action="CASCADE" del-action="CASCADE" ref-table="public.secrets" table="public.access">
<columns names="secret" ref-type="src-columns"/>
<columns names="id" ref-type="dst-columns"/>
</constraint>
<relationship name="rel_access_secrets" type="relfk" layer="0"
src-table="public.access"
dst-table="public.secrets" reference-fk="fk_access_secret"
src-required="false" dst-required="false"/>
</dbmodel>