Add login

This commit is contained in:
2020-01-05 23:20:38 +01:00
parent dc396a300f
commit c0926ffea0
35 changed files with 1647 additions and 39 deletions

View File

@@ -0,0 +1,8 @@
<?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">
<include file="prepare-database.sql" relativeToChangelogFile="true"/>
<include file="changeset/create-user.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -0,0 +1,28 @@
<?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-user-table" author="kratisto">
<createTable tableName="user">
<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="google_id" type="text" >
<constraints nullable="false" unique="true"/>
</column>
<column name="nickname" type="text">
<constraints nullable="false" unique="true"/>
</column>
<column name="email" type="text">
<constraints nullable="false" unique="true"/>
</column>
</createTable>
</changeSet>
</databaseChangeLog>

View File

@@ -0,0 +1,6 @@
url=jdbc:postgresql://database:5432/hamster_tycoon
username=postgres
password=password
changeLogFile=changelog-master.xml
logLevel=info
classpath=postgresql-42.2.9.jar

Binary file not shown.

View File

@@ -0,0 +1,3 @@
CREATE SCHEMA IF NOT EXISTS hamster_tycoon;
CREATE EXTENSION IF NOT EXISTS pgcrypto;