aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources
diff options
context:
space:
mode:
authorKevin Hoerr <kjhoerr@noreply.cybr.es>2022-08-06 01:44:00 +0000
committerKevin Hoerr <kjhoerr@noreply.cybr.es>2022-08-06 01:44:00 +0000
commit461b1fa053bcc86d06156574ab59fa7000dbf69e (patch)
tree6e0080d057b5015bd92c843481cf45575af462a8 /src/main/resources
parentcdf65b32202746eaffd9e58bf951d1995ab03be3 (diff)
downloadpantry-461b1fa053bcc86d06156574ab59fa7000dbf69e.tar.gz
pantry-461b1fa053bcc86d06156574ab59fa7000dbf69e.tar.bz2
pantry-461b1fa053bcc86d06156574ab59fa7000dbf69e.zip
Quarkus (#2)
Reviewed-on: https://git.submelon.dev/kjhoerr/pantry/pulls/2
Diffstat (limited to 'src/main/resources')
-rw-r--r--src/main/resources/application.properties9
-rw-r--r--src/main/resources/db/changeLog.xml8
-rw-r--r--src/main/resources/db/changelogs/20220804-add-pantryitem.xml30
3 files changed, 40 insertions, 7 deletions
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index dff3088..bd71024 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -1,7 +1,2 @@
-spring.jpa.hibernate.ddl-auto=create-drop
-spring.datasource.url=jdbc:mysql://${MARIADB_HOST:localhost}:3306/pantry-db
-spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
-spring.datasource.username=pantry-user
-spring.datasource.password=i2j9ds0g
-spring.jpa.show-sql=true
-spring.jpa.open-in-view=true
+quarkus.liquibase.clean-at-start=true
+quarkus.liquibase.migrate-at-start=true
diff --git a/src/main/resources/db/changeLog.xml b/src/main/resources/db/changeLog.xml
new file mode 100644
index 0000000..f759350
--- /dev/null
+++ b/src/main/resources/db/changeLog.xml
@@ -0,0 +1,8 @@
+<databaseChangeLog
+ xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
+ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd
+ http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
+ <include file="db/changelogs/20220804-add-pantryitem.xml" />
+</databaseChangeLog> \ No newline at end of file
diff --git a/src/main/resources/db/changelogs/20220804-add-pantryitem.xml b/src/main/resources/db/changelogs/20220804-add-pantryitem.xml
new file mode 100644
index 0000000..d118fa8
--- /dev/null
+++ b/src/main/resources/db/changelogs/20220804-add-pantryitem.xml
@@ -0,0 +1,30 @@
+<databaseChangeLog
+ xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
+ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd
+ http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
+ <changeSet id="20220804-add-pantryitem" author="kjhoerr">
+ <validCheckSum>8:350c0b8d4ff8ce36a2453a0fe2373684</validCheckSum>
+ <createSequence
+ sequenceName="hibernate_sequence"
+ incrementBy="1"
+ startValue="1"
+ />
+ <createTable tableName="pantryitem">
+ <column name="id" type="int8">
+ <constraints primaryKey="true" primaryKeyName="pk_pantryitem_id" nullable="false" />
+ </column>
+ <column name="name" type="varchar(80)">
+ <constraints nullable="false" />
+ </column>
+ <column name="description" type="varchar(1000)" />
+ <column name="quantity" type="float8">
+ <constraints nullable="false" />
+ </column>
+ <column name="quantityunittype" type="varchar(40)">
+ <constraints nullable="false" />
+ </column>
+ </createTable>
+ </changeSet>
+</databaseChangeLog> \ No newline at end of file