init
This commit is contained in:
12
liquibase/changelogs/changelog-master.xml
Normal file
12
liquibase/changelogs/changelog-master.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?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">
|
||||
|
||||
<!-- Define default schema name used by changesets-->
|
||||
<property name="schemaName" value="mam-contract"/>
|
||||
|
||||
<include file="prepare-database.sql" relativeToChangelogFile="true"/>
|
||||
<include file="changesets/create-user-table.xml" relativeToChangelogFile="true"/>
|
||||
</databaseChangeLog>
|
||||
20
liquibase/changelogs/changesets/create-user-table.xml
Normal file
20
liquibase/changelogs/changesets/create-user-table.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?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"
|
||||
logicalFilePath="/project/changesets/init-tables.xml">
|
||||
<changeSet id="create-user-table" author="kratisto">
|
||||
<createTable tableName="user" schemaName="${schemaName}">
|
||||
<column name="id" type="uuid" defaultValueComputed="gen_random_uuid()">
|
||||
<constraints primaryKey="true" nullable="false"/>
|
||||
</column>
|
||||
<column name="email" type="varchar(255)">
|
||||
<constraints unique="true"/>
|
||||
</column>
|
||||
<column name="google_user_id" type="varchar(255)">
|
||||
<constraints unique="true"/>
|
||||
</column>
|
||||
</createTable>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
7
liquibase/changelogs/liquibase.properties
Normal file
7
liquibase/changelogs/liquibase.properties
Normal file
@@ -0,0 +1,7 @@
|
||||
classpath: /workspace/postgresql-42.2.5.jar
|
||||
driver: org.postgresql.Driver
|
||||
url: jdbc:postgresql://database:5432/postgres
|
||||
username: postgres
|
||||
password: password
|
||||
changeLogFile: changelog-master.xml
|
||||
logLevel: info
|
||||
2
liquibase/changelogs/prepare-database.sql
Executable file
2
liquibase/changelogs/prepare-database.sql
Executable file
@@ -0,0 +1,2 @@
|
||||
CREATE SCHEMA IF NOT EXISTS workScheduler;
|
||||
CREATE EXTENSION IF NOT EXISTS pgcrypto;
|
||||
Reference in New Issue
Block a user