|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | +CAUTION: Do not modify this file unless you know what you are doing. |
| 4 | + Unexpected results may occur if the code is changed deliberately. |
| 5 | +--> |
| 6 | +<dbmodel pgmodeler-ver="0.7.0"> |
| 7 | +<database name="new_database"> |
| 8 | +</database> |
| 9 | + |
| 10 | +<schema name="public" protected="true" fill-color="#e1e1e1" sql-disabled="true"> |
| 11 | +</schema> |
| 12 | + |
| 13 | +<usertype name="request_state" configuration="enumeration"> |
| 14 | + <schema name="public"/> |
| 15 | + <enumeration values="pending,done"/> |
| 16 | +</usertype> |
| 17 | + |
| 18 | +<table name="requests"> |
| 19 | + <schema name="public"/> |
| 20 | + <position x="715" y="224"/> |
| 21 | + <column name="id" not-null="true"> |
| 22 | + <type name="serial"/> |
| 23 | + </column> |
| 24 | + <column name="ref" not-null="true"> |
| 25 | + <type name="character varying" length="10"/> |
| 26 | + </column> |
| 27 | + <column name="mail" not-null="true"> |
| 28 | + <type name="character varying" length="100"/> |
| 29 | + </column> |
| 30 | + <column name="date" not-null="true" default-value="NOW()"> |
| 31 | + <type name="timestamp" with-timezone="true"/> |
| 32 | + </column> |
| 33 | + <column name="state" not-null="true" default-value="'pending'"> |
| 34 | + <type name="public.request_state"/> |
| 35 | + </column> |
| 36 | + <constraint name="id_requests_pm" type="pk-constr" factor="10" table="public.requests"> |
| 37 | + <columns names="id" ref-type="src-columns"/> |
| 38 | + </constraint> |
| 39 | +</table> |
| 40 | + |
| 41 | +<usertype name="servers_type" configuration="enumeration"> |
| 42 | + <schema name="public"/> |
| 43 | + <enumeration values="sys,kimsufi"/> |
| 44 | +</usertype> |
| 45 | + |
| 46 | +<table name="servers"> |
| 47 | + <schema name="public"/> |
| 48 | + <position x="208" y="228"/> |
| 49 | + <column name="id" not-null="true"> |
| 50 | + <type name="serial"/> |
| 51 | + </column> |
| 52 | + <column name="type" not-null="true"> |
| 53 | + <type name="public.servers_type"/> |
| 54 | + </column> |
| 55 | + <column name="name" not-null="true"> |
| 56 | + <type name="character varying" length="100"/> |
| 57 | + </column> |
| 58 | + <column name="reference" not-null="true"> |
| 59 | + <type name="character varying" length="10"/> |
| 60 | + </column> |
| 61 | + <constraint name="id_servers_pm" type="pk-constr" factor="10" table="public.servers"> |
| 62 | + <columns names="id" ref-type="src-columns"/> |
| 63 | + </constraint> |
| 64 | +</table> |
| 65 | + |
| 66 | +<constraint name="reference_servers_fk" type="fk-constr" comparison-type="MATCH FULL" |
| 67 | + upd-action="NO ACTION" del-action="NO ACTION" ref-table="public.servers" table="public.requests"> |
| 68 | + <columns names="ref" ref-type="src-columns"/> |
| 69 | + <columns names="reference" ref-type="dst-columns"/> |
| 70 | +</constraint> |
| 71 | +<relationship name="rel_requests_servers" type="relfk" |
| 72 | + src-table="public.requests" |
| 73 | + dst-table="public.servers" |
| 74 | + src-required="true" dst-required="true"/> |
| 75 | + |
| 76 | +</dbmodel> |
0 commit comments