-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from Rapter1990/development/5/dml-files-for-liq…
…uibase PR : Issue #5 : Create DML files for liquibase
- Loading branch information
Showing
9 changed files
with
372 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.0.xsd"> | ||
|
||
<!-- ================================== --> | ||
<!-- DML of example USERS data --> | ||
<!-- ================================== --> | ||
|
||
<changeSet id="insertUsersExampleData1" author="seymusyuzen"> | ||
<insert tableName="USERS"> | ||
<column name="ID" value="a1b2c3d4-e5f6-a7b8-c9d0-0123456789ab"/> | ||
<column name="FULL_NAME" value="John Doe"/> | ||
<column name="USER_NAME" value="john_doe"/> | ||
<column name="EMAIL" value="john@example.com"/> | ||
<column name="PASSWORD" value="password123"/> | ||
<column name="ROLE" value="ROLE_ADMIN"/> | ||
</insert> | ||
</changeSet> | ||
|
||
<changeSet id="insertUsersExampleData2" author="seymusyuzen"> | ||
<insert tableName="USERS"> | ||
<column name="ID" value="c1d2e3f4-g5h6-i7j8-k9l0-23456789abcd"/> | ||
<column name="FULL_NAME" value="Bob Smith"/> | ||
<column name="USER_NAME" value="bob_smith"/> | ||
<column name="EMAIL" value="bob@example.com"/> | ||
<column name="PASSWORD" value="pass789"/> | ||
<column name="ROLE" value="ROLE_ADMIN"/> | ||
</insert> | ||
</changeSet> | ||
|
||
<changeSet id="insertUsersExampleData3" author="seymusyuzen"> | ||
<insert tableName="USERS"> | ||
<column name="ID" value="d1e2f3g4-h5i6-j7k8-l9m0-3456789abcde"/> | ||
<column name="FULL_NAME" value="Alice Johnson"/> | ||
<column name="USER_NAME" value="alice_j"/> | ||
<column name="EMAIL" value="alice@example.com"/> | ||
<column name="PASSWORD" value="pass123"/> | ||
<column name="ROLE" value="ROLE_DRIVER"/> | ||
</insert> | ||
</changeSet> | ||
|
||
<!-- ================================== --> | ||
<!-- DML of example USERS data --> | ||
<!-- ================================== --> | ||
</databaseChangeLog> |
39 changes: 39 additions & 0 deletions
39
src/main/resources/db/changelog/changes/3-refresh-token-dml.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.0.xsd"> | ||
|
||
<!-- ================================== --> | ||
<!-- DML of example TOKEN data --> | ||
<!-- ================================== --> | ||
|
||
<changeSet id="insertRefreshTokenExampleData1" author="seymusyuzen"> | ||
<insert tableName="REFRESH_TOKEN"> | ||
<column name="ID" value="a1b2c3d4-e5f6-a7b8-c9d0-0123456789ab"/> | ||
<column name="USER_ID" value="a1b2c3d4-e5f6-a7b8-c9d0-0123456789ab"/> | ||
<column name="TOKEN" value="random_refresh_token_1"/> | ||
<column name="EXPIRY_DATE" value="2024-02-29 12:00:00"/> | ||
</insert> | ||
</changeSet> | ||
|
||
<changeSet id="insertRefreshTokenExampleData2" author="seymusyuzen"> | ||
<insert tableName="REFRESH_TOKEN"> | ||
<column name="ID" value="b1c2d3e4-f5g6-h7i8-j9k0-123456789abc"/> | ||
<column name="USER_ID" value="c1d2e3f4-g5h6-i7j8-k9l0-23456789abcd"/> | ||
<column name="TOKEN" value="random_refresh_token_2"/> | ||
<column name="EXPIRY_DATE" value="2024-03-15 14:30:00"/> | ||
</insert> | ||
</changeSet> | ||
|
||
<changeSet id="insertRefreshTokenExampleData3" author="seymusyuzen"> | ||
<insert tableName="REFRESH_TOKEN"> | ||
<column name="ID" value="c1d2e3f4-g5h6-i7j8-k9l0-23456789abcd"/> | ||
<column name="USER_ID" value="d1e2f3g4-h5i6-j7k8-l9m0-3456789abcde"/> | ||
<column name="TOKEN" value="random_refresh_token_3"/> | ||
<column name="EXPIRY_DATE" value="2024-04-01 18:45:00"/> | ||
</insert> | ||
</changeSet> | ||
|
||
<!-- ================================== --> | ||
<!-- DML of example TOKEN data --> | ||
<!-- ================================== --> | ||
</databaseChangeLog> |
39 changes: 39 additions & 0 deletions
39
src/main/resources/db/changelog/changes/4-price-list-dml.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.0.xsd"> | ||
|
||
<!-- ================================== --> | ||
<!-- DML of example PRICE_LIST data --> | ||
<!-- ================================== --> | ||
|
||
<changeSet id="insertPriceListExampleData1" author="seymusyuzen"> | ||
<insert tableName="PRICE_LIST"> | ||
<column name="ID" value="a1b2c3d4-e5f6-a7b8-c9d0-0123456789ab"/> | ||
<column name="NAME" value="Standard Price List"/> | ||
<column name="CREATED_USER" value="john_doe"/> | ||
<column name="CREATED_AT" value="2024-02-01 10:30:00"/> | ||
</insert> | ||
</changeSet> | ||
|
||
<changeSet id="insertPriceListExampleData2" author="seymusyuzen"> | ||
<insert tableName="PRICE_LIST"> | ||
<column name="ID" value="b1c2d3e4-f5g6-h7i8-j9k0-123456789abc"/> | ||
<column name="NAME" value="Promotional Price List"/> | ||
<column name="CREATED_USER" value="bob_smith"/> | ||
<column name="CREATED_AT" value="2024-02-05 15:45:00"/> | ||
</insert> | ||
</changeSet> | ||
|
||
<changeSet id="insertPriceListExampleData3" author="seymusyuzen"> | ||
<insert tableName="PRICE_LIST"> | ||
<column name="ID" value="c1d2e3f4-g5h6-i7j8-k9l0-23456789abcd"/> | ||
<column name="NAME" value="Bulk Purchase Price List"/> | ||
<column name="CREATED_USER" value="alice_j"/> | ||
<column name="CREATED_AT" value="2024-02-10 08:00:00"/> | ||
</insert> | ||
</changeSet> | ||
|
||
<!-- ================================== --> | ||
<!-- DML of example PRICE_LIST data --> | ||
<!-- ================================== --> | ||
</databaseChangeLog> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.0.xsd"> | ||
|
||
<!-- ================================== --> | ||
<!-- DML of example VEHICLE data --> | ||
<!-- ================================== --> | ||
|
||
<changeSet id="insertVehicleExampleData1" author="seymusyuzen"> | ||
<insert tableName="VEHICLE"> | ||
<column name="ID" value="a1b2c3d4-e5f6-a7b8-c9d0-0123456789ab"/> | ||
<column name="LICENCE_PLATE" value="ABC123"/> | ||
<column name="USER_ID" value="a1b2c3d4-e5f6-a7b8-c9d0-0123456789ab"/> | ||
<column name="VEHICLE_TYPE" value="SEDAN"/> | ||
<column name="CREATED_USER" value="john_doe"/> | ||
<column name="CREATED_AT" value="2024-02-15 09:30:00"/> | ||
</insert> | ||
</changeSet> | ||
|
||
<changeSet id="insertVehicleExampleData2" author="seymusyuzen"> | ||
<insert tableName="VEHICLE"> | ||
<column name="ID" value="b1c2d3e4-f5g6-h7i8-j9k0-123456789abc"/> | ||
<column name="LICENCE_PLATE" value="XYZ789"/> | ||
<column name="USER_ID" value="c1d2e3f4-g5h6-i7j8-k9l0-23456789abcd"/> | ||
<column name="VEHICLE_TYPE" value="SUV"/> | ||
<column name="CREATED_USER" value="bob_smith"/> | ||
<column name="CREATED_AT" value="2024-02-20 14:15:00"/> | ||
</insert> | ||
</changeSet> | ||
|
||
<changeSet id="insertVehicleExampleData3" author="seymusyuzen"> | ||
<insert tableName="VEHICLE"> | ||
<column name="ID" value="c1d2e3f4-g5h6-i7j8-k9l0-23456789abcd"/> | ||
<column name="LICENCE_PLATE" value="PQR456"/> | ||
<column name="USER_ID" value="d1e2f3g4-h5i6-j7k8-l9m0-3456789abcde"/> | ||
<column name="VEHICLE_TYPE" value="MINIVAN"/> | ||
<column name="CREATED_USER" value="alice_j"/> | ||
<column name="CREATED_AT" value="2024-02-25 17:45:00"/> | ||
</insert> | ||
</changeSet> | ||
|
||
<!-- ================================== --> | ||
<!-- DML of example VEHICLE data --> | ||
<!-- ================================== --> | ||
</databaseChangeLog> |
51 changes: 51 additions & 0 deletions
51
src/main/resources/db/changelog/changes/6-parking-area-dml.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.0.xsd"> | ||
|
||
<!-- ================================== --> | ||
<!-- DML of example PARKING_AREA data --> | ||
<!-- ================================== --> | ||
|
||
<changeSet id="insertParkingAreaExampleData1" author="seymusyuzen"> | ||
<insert tableName="PARKING_AREA"> | ||
<column name="ID" value="a1b2c3d4-e5f6-a7b8-c9d0-0123456789ab"/> | ||
<column name="NAME" value="Downtown Parking"/> | ||
<column name="LOCATION" value="Main Street Garage"/> | ||
<column name="CAPACITY" value="100"/> | ||
<column name="CITY" value="New York"/> | ||
<column name="PRICE_LIST_ID" value="a1b2c3d4-e5f6-a7b8-c9d0-0123456789ab"/> | ||
<column name="CREATED_USER" value="john_doe"/> | ||
<column name="CREATED_AT" value="2024-03-01 12:30:00"/> | ||
</insert> | ||
</changeSet> | ||
|
||
<changeSet id="insertParkingAreaExampleData2" author="seymusyuzen"> | ||
<insert tableName="PARKING_AREA"> | ||
<column name="ID" value="b1c2d3e4-f5g6-h7i8-j9k0-123456789abc"/> | ||
<column name="NAME" value="Suburban Parking"/> | ||
<column name="LOCATION" value="Green Hills Lot"/> | ||
<column name="CAPACITY" value="150"/> | ||
<column name="CITY" value="Los Angeles"/> | ||
<column name="PRICE_LIST_ID" value="b1c2d3e4-f5g6-h7i8-j9k0-123456789abc"/> | ||
<column name="CREATED_USER" value="bob_smith"/> | ||
<column name="CREATED_AT" value="2024-03-05 15:45:00"/> | ||
</insert> | ||
</changeSet> | ||
|
||
<changeSet id="insertParkingAreaExampleData3" author="seymusyuzen"> | ||
<insert tableName="PARKING_AREA"> | ||
<column name="ID" value="c1d2e3f4-g5h6-i7j8-k9l0-23456789abcd"/> | ||
<column name="NAME" value="Commercial Parking"/> | ||
<column name="LOCATION" value="Business District Garage"/> | ||
<column name="CAPACITY" value="200"/> | ||
<column name="CITY" value="San Francisco"/> | ||
<column name="PRICE_LIST_ID" value="c1d2e3f4-g5h6-i7j8-k9l0-23456789abcd"/> | ||
<column name="CREATED_USER" value="alice_j"/> | ||
<column name="CREATED_AT" value="2024-03-10 08:00:00"/> | ||
</insert> | ||
</changeSet> | ||
|
||
<!-- ================================== --> | ||
<!-- DML of example PARKING_AREA data --> | ||
<!-- ================================== --> | ||
</databaseChangeLog> |
45 changes: 45 additions & 0 deletions
45
src/main/resources/db/changelog/changes/7-daily-income-dml.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.0.xsd"> | ||
|
||
<!-- ================================== --> | ||
<!-- DML of example DAILY_INCOME data --> | ||
<!-- ================================== --> | ||
|
||
<changeSet id="insertDailyIncomeExampleData1" author="seymusyuzen"> | ||
<insert tableName="DAILY_INCOME"> | ||
<column name="ID" value="a1b2c3d4-e5f6-a7b8-c9d0-0123456789ab"/> | ||
<column name="DATE" value="2024-03-01"/> | ||
<column name="INCOME" value="1200.5000"/> | ||
<column name="PARKING_AREA_ID" value="a1b2c3d4-e5f6-a7b8-c9d0-0123456789ab"/> | ||
<column name="CREATED_USER" value="john_doe"/> | ||
<column name="CREATED_AT" value="2024-03-01 18:30:00"/> | ||
</insert> | ||
</changeSet> | ||
|
||
<changeSet id="insertDailyIncomeExampleData2" author="seymusyuzen"> | ||
<insert tableName="DAILY_INCOME"> | ||
<column name="ID" value="b1c2d3e4-f5g6-h7i8-j9k0-123456789abc"/> | ||
<column name="DATE" value="2024-03-05"/> | ||
<column name="INCOME" value="850.2500"/> | ||
<column name="PARKING_AREA_ID" value="b1c2d3e4-f5g6-h7i8-j9k0-123456789abc"/> | ||
<column name="CREATED_USER" value="bob_smith"/> | ||
<column name="CREATED_AT" value="2024-03-05 12:15:00"/> | ||
</insert> | ||
</changeSet> | ||
|
||
<changeSet id="insertDailyIncomeExampleData3" author="seymusyuzen"> | ||
<insert tableName="DAILY_INCOME"> | ||
<column name="ID" value="c1d2e3f4-g5h6-i7j8-k9l0-23456789abcd"/> | ||
<column name="DATE" value="2024-03-10"/> | ||
<column name="INCOME" value="1600.7500"/> | ||
<column name="PARKING_AREA_ID" value="c1d2e3f4-g5h6-i7j8-k9l0-23456789abcd"/> | ||
<column name="CREATED_USER" value="alice_j"/> | ||
<column name="CREATED_AT" value="2024-03-10 08:45:00"/> | ||
</insert> | ||
</changeSet> | ||
|
||
<!-- ================================== --> | ||
<!-- DML of example DAILY_INCOME data --> | ||
<!-- ================================== --> | ||
</databaseChangeLog> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.0.xsd"> | ||
|
||
<!-- ================================== --> | ||
<!-- DML of example PARK data --> | ||
<!-- ================================== --> | ||
|
||
<changeSet id="insertParkExampleData1" author="seymusyuzen"> | ||
<insert tableName="PARK"> | ||
<column name="ID" value="a1b2c3d4-e5f6-a7b8-c9d0-0123456789ab"/> | ||
<column name="CHECK_IN" value="2024-03-01 09:00:00"/> | ||
<column name="CHECK_OUT" value="2024-03-01 16:30:00"/> | ||
<column name="TOTAL_COST" value="25.7500"/> | ||
<column name="PARKING_AREA_ID" value="a1b2c3d4-e5f6-a7b8-c9d0-0123456789ab"/> | ||
<column name="VEHICLE_ID" value="a1b2c3d4-e5f6-a7b8-c9d0-0123456789ab"/> | ||
<column name="PARK_STATUS" value="FULL"/> | ||
<column name="CREATED_USER" value="john_doe"/> | ||
<column name="CREATED_AT" value="2024-03-01 16:30:00"/> | ||
</insert> | ||
</changeSet> | ||
|
||
<changeSet id="insertParkExampleData2" author="seymusyuzen"> | ||
<insert tableName="PARK"> | ||
<column name="ID" value="b1c2d3e4-f5g6-h7i8-j9k0-123456789abc"/> | ||
<column name="CHECK_IN" value="2024-03-05 12:30:00"/> | ||
<column name="CHECK_OUT" value="2024-03-05 18:45:00"/> | ||
<column name="TOTAL_COST" value="18.2500"/> | ||
<column name="PARKING_AREA_ID" value="b1c2d3e4-f5g6-h7i8-j9k0-123456789abc"/> | ||
<column name="VEHICLE_ID" value="b1c2d3e4-f5g6-h7i8-j9k0-123456789abc"/> | ||
<column name="PARK_STATUS" value="EMPTY"/> | ||
<column name="CREATED_USER" value="bob_smith"/> | ||
<column name="CREATED_AT" value="2024-03-05 18:45:00"/> | ||
</insert> | ||
</changeSet> | ||
|
||
<changeSet id="insertParkExampleData3" author="seymusyuzen"> | ||
<insert tableName="PARK"> | ||
<column name="ID" value="c1d2e3f4-g5h6-i7j8-k9l0-23456789abcd"/> | ||
<column name="CHECK_IN" value="2024-03-10 08:45:00"/> | ||
<column name="CHECK_OUT" value="2024-03-10 17:15:00"/> | ||
<column name="TOTAL_COST" value="32.5000"/> | ||
<column name="PARKING_AREA_ID" value="c1d2e3f4-g5h6-i7j8-k9l0-23456789abcd"/> | ||
<column name="VEHICLE_ID" value="c1d2e3f4-g5h6-i7j8-k9l0-23456789abcd"/> | ||
<column name="PARK_STATUS" value="FULL"/> | ||
<column name="CREATED_USER" value="alice_j"/> | ||
<column name="CREATED_AT" value="2024-03-10 17:15:00"/> | ||
</insert> | ||
</changeSet> | ||
|
||
<!-- ================================== --> | ||
<!-- DML of example PARK data --> | ||
<!-- ================================== --> | ||
</databaseChangeLog> |
Oops, something went wrong.