Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new user to system #1234

Merged
merged 2 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dao/src/main/resources/db/changelog/db.changelog-master.xml
Original file line number Diff line number Diff line change
Expand Up @@ -220,4 +220,6 @@
<include file="db/changelog/logs/ch-add-column-status-to-bag-table-Spodaryk.xml"/>
<include file="/db/changelog/logs/ch-update-order-bag-mapping-table-Spodaryk.xml"/>
<include file="/db/changelog/logs/ch-add-column-order-bag-mapping-table-Spodaryk.xml"/>
<include file="/db/changelog/logs/ch-insert-into-users-Spodaryk.xml"/>

</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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-3.4.xsd">
<changeSet id="Spodaryk-8" author="Oksana Spodaryk">
<preConditions onFail="MARK_RAN">
<sqlCheck expectedResult="1">
SELECT COUNT(*) FROM users WHERE recipient_email = '[email protected]';
</sqlCheck>
</preConditions>

<delete tableName="users">
<where>recipient_email = '[email protected]'</where>
</delete>
</changeSet>
<changeSet id="Spodaryk-9" author="Oksana Spodaryk">
<insert tableName="users">
<column name = "current_points" value="0"/>
<column name="uuid" value="550e8400-e29b-41d4-a716-446655440000"/>
<column name="violations" value="0"/>
<column name="recipient_name" value="ADMIN"/>
<column name="recipient_email" value="[email protected]"/>
<column name="recipient_phone" value="+380979797979"/>
<column name="recipient_surname" value="GREENCITY"/>
<column name = "date_of_registration" value="1970-01-01 00:00:00.000000"/>
</insert>
</changeSet>

</databaseChangeLog>