-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathv1.0_CreateUserTable.xml
More file actions
39 lines (39 loc) · 1.39 KB
/
v1.0_CreateUserTable.xml
File metadata and controls
39 lines (39 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?xml version="1.0" encoding="UTF-8"?>
<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.20.xsd">
<changeSet id="1" author="aromanow" labels="v1.0">
<sql>
CREATE TABLE users
(
id INT NOT NULL PRIMARY KEY,
name VARCHAR(10) NOT NULL,
status VARCHAR(10),
location VARCHAR(80)
);
</sql>
<rollback>
<sql>
DROP TABLE users;
</sql>
</rollback>
</changeSet>
<changeSet id="2" author="aromanow" labels="v1.0">
<sql>
INSERT INTO users (id, name, status, location)
VALUES (1, 'Alex', 'APPROVED', 'Moscow'),
(2, 'Kate', 'APPROVED', 'Moscow'),
(3, 'Ivan', 'NEW', 'SPb'),
(4, 'Mike', 'NEW', 'Moscow region'),
(5, 'Dima', 'APPROVED', 'Rostov');
</sql>
<rollback>
TRUNCATE TABLE users;
</rollback>
</changeSet>
<changeSet id="3" author="aromanow" labels="v1.0">
<tagDatabase tag="v1.0"/>
</changeSet>
</databaseChangeLog>