Liquibase edit data

This commit is contained in:
Niktia 2025-02-19 12:49:16 +03:00
parent 7857bfc909
commit 9ff70c9279
8 changed files with 26 additions and 17 deletions

View File

@ -24,7 +24,7 @@
<column name="password" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="description" type="VARCHAR(200)"/>
<column name="position" type="VARCHAR(200)"/>
<column name="birth_date" type="VARCHAR(10)"/>
<column name="avatar_url" type="VARCHAR"/>
<column name="last_enter" type="TIMESTAMP"/>

View File

@ -16,7 +16,7 @@
<column name="id" type="BIGINT" autoIncrement="true">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="user_id" type="BIGINT">
<column name="employee_id" type="BIGINT">
<constraints nullable="false" foreignKeyName="fk_userauth_employee" referencedTableName="employee"
referencedColumnNames="id"/>
</column>

View File

@ -23,6 +23,12 @@
<constraints nullable="false" foreignKeyName="fk_code_enter" referencedTableName="code"
referencedColumnNames="id"/>
</column>
<column name="entered_at" type="Timestamp">
<constraints nullable="false"/>
</column>
<column name="enter_type" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
</databaseChangeLog>

View File

@ -6,6 +6,9 @@
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
<changeSet id="2025-02-18--0005-enter-data" author="nzhavoronkov">
<sql>
ALTER TABLE enter ALTER COLUMN entered_at SET DEFAULT CURRENT_TIMESTAMP;
</sql>
<loadData tableName="enter" file="db.changelog/data/csv/2025-02-18--0005-enter-data.csv"
separator=";"
quotchar='"'

View File

@ -1,6 +1,6 @@
name;value
Вход "A";1234567890123456789
Вход "Реактор";9223372036854775807
Вход "Лаборатория";1122334455667788990
Вход "Навигация";998877665544332211
Вход "Б";5566778899001122334
Вход 'A';1234567890123456789
Вход 'Реактор';9223372036854775807
Вход 'Лаборатория';1122334455667788990
Вход 'Навигация';998877665544332211
Вход 'Б';5566778899001122334
Can't render this file because it contains an unexpected character in line 2 and column 10.

View File

@ -1,4 +1,4 @@
name;login;password;description;avatar_url
name;login;password;position;avatar_url
Никита;nzh;$2b$12$.XPrLwQtsr2UzI6M/KiqFO6UY.aUyRULerAd.cgjAeQOLj0pljmPG;sysadmin - is my passion;https://i.pinimg.com/736x/74/50/b2/7450b27aefa67d3ba126dab3023d3a4f.jpg
Ксюша;ksh;$2b$12$.XPrLwQtsr2UzI6M/KiqFO6UY.aUyRULerAd.cgjAeQOLj0pljmPG;ui/ux - true love;https://s2.hostingkartinok.com/uploads/images/2013/08/9b22035204e381ee2b54d10b9251d9e1.png
Вася;vasya;$2b$12$.XPrLwQtsr2UzI6M/KiqFO6UY.aUyRULerAd.cgjAeQOLj0pljmPG;;https://i.pinimg.com/736x/45/76/20/45762041651b269c7375e4bc83137695.jpg

1 name login password description position avatar_url
2 Никита nzh $2b$12$.XPrLwQtsr2UzI6M/KiqFO6UY.aUyRULerAd.cgjAeQOLj0pljmPG sysadmin - is my passion https://i.pinimg.com/736x/74/50/b2/7450b27aefa67d3ba126dab3023d3a4f.jpg
3 Ксюша ksh $2b$12$.XPrLwQtsr2UzI6M/KiqFO6UY.aUyRULerAd.cgjAeQOLj0pljmPG ui/ux - true love https://s2.hostingkartinok.com/uploads/images/2013/08/9b22035204e381ee2b54d10b9251d9e1.png
4 Вася vasya $2b$12$.XPrLwQtsr2UzI6M/KiqFO6UY.aUyRULerAd.cgjAeQOLj0pljmPG https://i.pinimg.com/736x/45/76/20/45762041651b269c7375e4bc83137695.jpg

View File

@ -1,3 +1,3 @@
user_id;authorities_id
employee_id;authorities_id
1;2
2;2

1 user_id employee_id authorities_id
2 1 1 2
3 2 2 2

View File

@ -1,8 +1,8 @@
employee_id;code_id
1;1
1;3
1;4
2;2
2;3
2;2
2;5
employee_id;code_id;enter_type
1;1;phone
1;3;phone
1;4;phone
2;2;card
2;3;card
2;2;phone
2;5;card
1 employee_id code_id enter_type
2 1 1 phone
3 1 3 phone
4 1 4 phone
5 2 2 card
6 2 3 card
7 2 2 phone
8 2 5 card