first init

This commit is contained in:
Valentin CZERYBA 2022-09-21 23:36:06 +02:00
commit 554e23142c
2 changed files with 122 additions and 0 deletions

46
example-changelog.xml Normal file
View File

@ -0,0 +1,46 @@
<?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-latest.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
<changeSet author="valentin (generated)" id="1663795988954-1">
<createTable tableName="users">
<column name="id" type="UUID">
<constraints nullable="false" primaryKey="true" primaryKeyName="users_pkey"/>
</column>
<column name="birth" type="date">
<constraints nullable="false"/>
</column>
<column name="connected_at" type="TIMESTAMP WITHOUT TIME ZONE"/>
<column name="created_at" type="TIMESTAMP WITHOUT TIME ZONE">
<constraints nullable="false"/>
</column>
<column name="deleted_at" type="TIMESTAMP WITHOUT TIME ZONE"/>
<column name="email" type="VARCHAR(255)">
<constraints nullable="false"/>
</column>
<column name="firstname" type="VARCHAR(255)">
<constraints nullable="false"/>
</column>
<column name="name" type="VARCHAR(255)">
<constraints nullable="false"/>
</column>
<column name="password" type="VARCHAR(255)">
<constraints nullable="false"/>
</column>
<column name="pseudo" type="VARCHAR(255)">
<constraints nullable="false"/>
</column>
<column name="roles" type="VARCHAR(255)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0" name="status" type="SMALLINT"/>
<column name="updated_at" type="TIMESTAMP WITHOUT TIME ZONE">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="valentin (generated)" id="1663795988954-2">
<addUniqueConstraint columnNames="email" constraintName="uk_6dotkott2kjsp8vw4d0m25fb7" tableName="users"/>
</changeSet>
<changeSet author="valentin (generated)" id="1663795988954-3">
<addUniqueConstraint columnNames="pseudo" constraintName="uk_r9i2upm423j62a0neosbc8ucq" tableName="users"/>
</changeSet>
</databaseChangeLog>

76
liquibase.properties Normal file
View File

@ -0,0 +1,76 @@
#### _ _ _ _
## | | (_) (_) |
## | | _ __ _ _ _ _| |__ __ _ ___ ___
## | | | |/ _` | | | | | '_ \ / _` / __|/ _ \
## | |___| | (_| | |_| | | |_) | (_| \__ \ __/
## \_____/_|\__, |\__,_|_|_.__/ \__,_|___/\___|
## | |
## |_|
##
## The liquibase.properties file stores properties which do not change often,
## such as database connection information. Properties stored here save time
## and reduce risk of mistyped command line arguments.
## Learn more: https://docs.liquibase.com/concepts/connections/creating-config-properties.html
####
####
## Note about relative and absolute paths:
## The liquibase.properties file requires paths for some properties.
## The classpath is the path/to/resources (ex. src/main/resources).
## The changeLogFile path is relative to the classpath.
## The url H2 example below is relative to 'pwd' resource.
####
# Enter the path for your changelog file.
changeLogFile=example-changelog.xml
#### Enter the Target database 'url' information ####
liquibase.command.url=jdbc:postgresql://localhost:5432/toto
# Enter the username for your Target database.
liquibase.command.username: toto
# Enter the password for your Target database.
liquibase.command.password: toto
#### Enter the Source Database 'referenceUrl' information ####
## The source database is the baseline or reference against which your target database is compared for diff/diffchangelog commands.
# Enter URL for the source database
#liquibase.command.referenceUrl: jdbc:h2:tcp://localhost:9090/mem:integration
# Enter the username for your source database
#liquibase.command.referenceUsername: dbuser
# Enter the password for your source database
#liquibase.command.referencePassword: letmein
# Logging Configuration
# logLevel controls the amount of logging information generated. If not set, the default logLevel is INFO.
# Valid values, from least amount of logging to most, are:
# OFF, ERROR, WARN, INFO, DEBUG, TRACE, ALL
# If you are having problems, setting the logLevel to DEBUG and re-running the command can be helpful.
# logLevel: DEBUG
# The logFile property controls where logging messages are sent. If this is not set, then logging messages are
# displayed on the console. If this is set, then messages will be sent to a file with the given name.
# logFile: liquibase.log
#### Liquibase Pro Key Information ####
# Learn more, contact support, or get or renew a Pro Key at https://www.liquibase.com/trial
# liquibase.licenseKey:
#### Liquibase Hub Information ####
# Liquibase Hub is a free secure SaaS portal providing status reporting, monitoring & insights
# into your Liquibase database release automation.
# https://hub.liquibase.com
## Add your free Hub API key here
# liquibase.hub.apikey:
# liquibase.hub.mode:all
## Get documentation at docs.liquibase.com ##
## Get certified courses at learn.liquibase.com ##
## Get support at liquibase.com/support ##