This commit is contained in:
2022-10-20 10:36:29 +02:00
parent c37d824191
commit 79d9f55fdc
44 changed files with 130 additions and 371 deletions

View File

@@ -3,18 +3,21 @@
<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-jointaccount-table" author="kratisto">
<createTable tableName="jointaccount">
<changeSet id="add-budget-table" author="kratisto">
<createTable tableName="budget">
<column name="id" type="uuid" defaultValueComputed="gen_random_uuid()">
<constraints nullable="false" unique="true"/>
</column>
<column name="name" type="text" >
<constraints nullable="true"/>
</column>
<column name="provider" type="text">
<constraints nullable="true"/>
<column name="closed" type="boolean" defaultValueComputed="false">
<constraints nullable="false"/>
</column>
<column name="user_id" type="uuid" >
<column name="duration_start" type="text" >
<constraints nullable="false"/>
</column>
<column name="duration_end" type="text" >
<constraints nullable="false"/>
</column>
<column name="created_at" type="timestamp" defaultValueComputed="now()">

View File

@@ -3,20 +3,17 @@
<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-account-table" author="kratisto">
<createTable tableName="account">
<changeSet id="add-category-table" author="kratisto">
<createTable tableName="category">
<column name="id" type="uuid" defaultValueComputed="gen_random_uuid()">
<constraints nullable="false" unique="true"/>
</column>
<column name="name" type="text" >
<constraints nullable="true"/>
</column>
<column name="provider" type="text">
<column name="budget" type="double" >
<constraints nullable="true"/>
</column>
<column name="user_id" type="uuid" >
<constraints nullable="false"/>
</column>
<column name="created_at" type="timestamp" defaultValueComputed="now()">
<constraints nullable="true"/>
</column>

View File

@@ -8,7 +8,7 @@
<column name="id" type="uuid" defaultValueComputed="gen_random_uuid()">
<constraints nullable="false" unique="true"/>
</column>
<column name="account_id" type="uuid">
<column name="category_id" type="uuid">
<constraints nullable="false"/>
</column>
<column name="libelle" type="text" >
@@ -17,9 +17,6 @@
<column name="value" type="number">
<constraints nullable="false"/>
</column>
<column name="type_expense" type="char(1)">
<constraints nullable="false"/>
</column>
<column name="expense_date" type="timestamp" defaultValueComputed="now()">
<constraints nullable="true"/>
</column>

View File

@@ -1,34 +0,0 @@
<?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-jointexpenses-table" author="kratisto">
<createTable tableName="jointexpense">
<column name="id" type="uuid" defaultValueComputed="gen_random_uuid()">
<constraints nullable="false" unique="true"/>
</column>
<column name="jointaccount_id" type="uuid">
<constraints nullable="false"/>
</column>
<column name="libelle" type="text" >
<constraints nullable="true"/>
</column>
<column name="value" type="number">
<constraints nullable="false"/>
</column>
<column name="type_jointexpense" type="char(1)">
<constraints nullable="false"/>
</column>
<column name="jointexpense_date" type="timestamp" defaultValueComputed="now()">
<constraints nullable="true"/>
</column>
<column name="created_at" type="timestamp" defaultValueComputed="now()">
<constraints nullable="true"/>
</column>
<column name="updated_at" type="timestamp">
<constraints nullable="true"/>
</column>
</createTable>
</changeSet>
</databaseChangeLog>

View File

@@ -1,22 +0,0 @@
<?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-shared-account-table" author="kratisto">
<createTable tableName="shared_account">
<column name="id" type="uuid" defaultValueComputed="gen_random_uuid()">
<constraints nullable="false" unique="true"/>
</column>
<column name="shared_account" type="uuid">
<constraints nullable="false"/>
</column>
<column name="created_at" type="timestamp">
<constraints nullable="true"/>
</column>
<column name="user_id" type="uuid" >
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
</databaseChangeLog>

View File

@@ -20,6 +20,9 @@
<column name="email" type="text">
<constraints nullable="false" unique="true"/>
</column>
<column name="nickname" type="text">
<constraints nullable="false" unique="true"/>
</column>
</createTable>
</changeSet>
</databaseChangeLog>