Done ticket GEPAFINBE-3
This commit is contained in:
137
src/main/resources/db/changelog/db.changelog-1.0.0.xml
Normal file
137
src/main/resources/db/changelog/db.changelog-1.0.0.xml
Normal file
@@ -0,0 +1,137 @@
|
||||
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||
<databaseChangeLog
|
||||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
|
||||
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/pro http://www.liquibase.org/xml/ns/pro/liquibase-pro-4.0.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.23.xsd">
|
||||
<changeSet id="14-08-2024_1" author="Harish Bagora">
|
||||
<createTable tableName="region">
|
||||
<column autoIncrement="true" name="id" type="INTEGER">
|
||||
<constraints nullable="false" primaryKey="true"
|
||||
primaryKeyName="region_pkey"/>
|
||||
</column>
|
||||
<column name="region_name" type="VARCHAR(255)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="description" type="TEXT">
|
||||
</column>
|
||||
<column name="created_date" type="TIMESTAMP WITHOUT TIME ZONE">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="updated_date" type="TIMESTAMP WITHOUT TIME ZONE">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="country" type="VARCHAR(100)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="status" type="VARCHAR(255)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="priority_area" type="VARCHAR(255)">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="population" type="INTEGER">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="area_size" type="numeric">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="gdp" type="numeric">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="unemployment_rate" type="numeric">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="infrastructure_score" type="numeric">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="education_level" type="numeric">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="healthcare_access" type="numeric">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="environmental_score" type="numeric">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
</createTable>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="14-08-2024_2" author="Harish Bagora">
|
||||
<createTable tableName="role">
|
||||
<column autoIncrement="true" name="id" type="INTEGER">
|
||||
<constraints nullable="false" primaryKey="true"
|
||||
primaryKeyName="role_pkey"/>
|
||||
</column>
|
||||
<column name="role_name" type="VARCHAR(255)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="description" type="VARCHAR(255)">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="created_date" type="TIMESTAMP WITHOUT TIME ZONE">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="updated_date" type="TIMESTAMP WITHOUT TIME ZONE">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="permissions" type="TEXT">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="region_id" type="INTEGER">
|
||||
<constraints nullable="false" foreignKeyName="fk_role_region" references="region(id)"/>
|
||||
</column>
|
||||
</createTable>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="14-08-2024_3" author="Harish Bagora">
|
||||
<createTable tableName="user">
|
||||
<column autoIncrement="true" name="id" type="INTEGER">
|
||||
<constraints nullable="false" primaryKey="true"
|
||||
primaryKeyName="user_pkey"/>
|
||||
</column>
|
||||
<column name="password" type="VARCHAR(255)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="email" type="varchar(255)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="first_name" type="VARCHAR(255)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="last_name" type="VARCHAR(255)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="phone_number" type="VARCHAR(255)"/>
|
||||
<column name="role_id" type="INTEGER">
|
||||
<constraints nullable="false" foreignKeyName="fk_user_role" references="role(id)"/>
|
||||
</column>
|
||||
<column name="status" type="VARCHAR(255)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="last_login" type="TIMESTAMP WITHOUT TIME ZONE">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="created_date" type="TIMESTAMP WITHOUT TIME ZONE">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="updated_date" type="TIMESTAMP WITHOUT TIME ZONE">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="organization" type="TEXT">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="address" type="TEXT">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="city" type="TEXT">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="country" type="TEXT">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
</createTable>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
Reference in New Issue
Block a user