70 lines
2.9 KiB
XML
70 lines
2.9 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<databaseChangeLog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
|
|
<changeSet id="add-hamster-table" author="kratisto">
|
|
<createTable tableName="hamster">
|
|
<column name="id" type="uuid" defaultValueComputed="gen_random_uuid()">
|
|
<constraints nullable="false" unique="true"/>
|
|
</column>
|
|
<column name="created_at" type="timestamp" defaultValueComputed="now()">
|
|
<constraints nullable="true"/>
|
|
</column>
|
|
<column name="updated_at" type="timestamp">
|
|
<constraints nullable="true"/>
|
|
</column>
|
|
<column name="name" type="text" >
|
|
<constraints nullable="false"/>
|
|
</column>
|
|
<column name="number" type="integer">
|
|
<constraints nullable="false"/>
|
|
</column>
|
|
<column name="sexe" type="text">
|
|
<constraints nullable="false"/>
|
|
</column>
|
|
<column name="age" type="integer">
|
|
<constraints nullable="false"/>
|
|
</column>
|
|
<column name="father_id" type="uuid">
|
|
<constraints nullable="false"/>
|
|
</column>
|
|
<column name="mother_id" type="uuid">
|
|
<constraints nullable="false"/>
|
|
</column>
|
|
<column name="cage_id" type="uuid">
|
|
<constraints nullable="false"/>
|
|
</column>
|
|
<column name="hunger_level" type="integer">
|
|
<constraints nullable="false"/>
|
|
</column>
|
|
<column name="thirst_level" type="integer">
|
|
<constraints nullable="false"/>
|
|
</column>
|
|
<column name="weight" type="float">
|
|
<constraints nullable="false"/>
|
|
</column>
|
|
<column name="height" type="float">
|
|
<constraints nullable="false"/>
|
|
</column>
|
|
<column name="alive" type="boolean">
|
|
<constraints nullable="false"/>
|
|
</column>
|
|
<column name="sold" type="boolean">
|
|
<constraints nullable="false"/>
|
|
</column>
|
|
<column name="gestation" type="boolean">
|
|
<constraints nullable="false"/>
|
|
</column>
|
|
<column name="gestation_period" type="integer">
|
|
<constraints nullable="false"/>
|
|
</column>
|
|
<column name="gestation_cooldown" type="integer">
|
|
<constraints nullable="false"/>
|
|
</column>
|
|
<column name="gestation_father_id" type="uuid">
|
|
<constraints nullable="false"/>
|
|
</column>
|
|
</createTable>
|
|
</changeSet>
|
|
</databaseChangeLog> |