From fa674406f442c51556a2d96c1dafe48e9b11ceeb Mon Sep 17 00:00:00 2001 From: Petr Rudichev Date: Wed, 19 Feb 2025 17:38:43 +0300 Subject: [PATCH] feat: added liqubase scripts --- .../0.0.1/2025-02-19--0001-roles.xml | 21 +++++ .../0.0.1/2025-02-19--0002-positions.xml | 21 +++++ .../0.0.1/2025-02-19--0003-passages.xml | 21 +++++ .../0.0.1/2025-02-19--0004-offices.xml | 89 +++++++++++++++++++ .../0.0.1/2025-02-19--0005-terminals.xml | 34 +++++++ .../data/2025-02-19--0001-roles-data.xml | 9 ++ .../data/2025-02-19--0002-positions-data.xml | 9 ++ .../data/2025-02-19--0003-passages-data.xml | 9 ++ .../data/csv/2025-02-19--0001-roles-data.csv | 3 + .../data/csv/2025-02-19--0002-positions.csv | 4 + .../csv/2025-02-19--0003-passages-data.csv | 3 + .../db.changelog/db.changelog-master.xml | 5 ++ 12 files changed, 228 insertions(+) create mode 100644 src/main/resources/db.changelog/0.0.1/2025-02-19--0001-roles.xml create mode 100644 src/main/resources/db.changelog/0.0.1/2025-02-19--0002-positions.xml create mode 100644 src/main/resources/db.changelog/0.0.1/2025-02-19--0003-passages.xml create mode 100644 src/main/resources/db.changelog/0.0.1/2025-02-19--0004-offices.xml create mode 100644 src/main/resources/db.changelog/0.0.1/2025-02-19--0005-terminals.xml create mode 100644 src/main/resources/db.changelog/data/2025-02-19--0001-roles-data.xml create mode 100644 src/main/resources/db.changelog/data/2025-02-19--0002-positions-data.xml create mode 100644 src/main/resources/db.changelog/data/2025-02-19--0003-passages-data.xml create mode 100644 src/main/resources/db.changelog/data/csv/2025-02-19--0001-roles-data.csv create mode 100644 src/main/resources/db.changelog/data/csv/2025-02-19--0002-positions.csv create mode 100644 src/main/resources/db.changelog/data/csv/2025-02-19--0003-passages-data.csv diff --git a/src/main/resources/db.changelog/0.0.1/2025-02-19--0001-roles.xml b/src/main/resources/db.changelog/0.0.1/2025-02-19--0001-roles.xml new file mode 100644 index 0000000..6ab9916 --- /dev/null +++ b/src/main/resources/db.changelog/0.0.1/2025-02-19--0001-roles.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/db.changelog/0.0.1/2025-02-19--0002-positions.xml b/src/main/resources/db.changelog/0.0.1/2025-02-19--0002-positions.xml new file mode 100644 index 0000000..1ae3df0 --- /dev/null +++ b/src/main/resources/db.changelog/0.0.1/2025-02-19--0002-positions.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/db.changelog/0.0.1/2025-02-19--0003-passages.xml b/src/main/resources/db.changelog/0.0.1/2025-02-19--0003-passages.xml new file mode 100644 index 0000000..eaa574e --- /dev/null +++ b/src/main/resources/db.changelog/0.0.1/2025-02-19--0003-passages.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/db.changelog/0.0.1/2025-02-19--0004-offices.xml b/src/main/resources/db.changelog/0.0.1/2025-02-19--0004-offices.xml new file mode 100644 index 0000000..ed1fc30 --- /dev/null +++ b/src/main/resources/db.changelog/0.0.1/2025-02-19--0004-offices.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/db.changelog/0.0.1/2025-02-19--0005-terminals.xml b/src/main/resources/db.changelog/0.0.1/2025-02-19--0005-terminals.xml new file mode 100644 index 0000000..79a6804 --- /dev/null +++ b/src/main/resources/db.changelog/0.0.1/2025-02-19--0005-terminals.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.REMOVE) + @JoinColumn(name = "office_id", nullable = false) + private Office office; + + + \ No newline at end of file diff --git a/src/main/resources/db.changelog/data/2025-02-19--0001-roles-data.xml b/src/main/resources/db.changelog/data/2025-02-19--0001-roles-data.xml new file mode 100644 index 0000000..3af0da8 --- /dev/null +++ b/src/main/resources/db.changelog/data/2025-02-19--0001-roles-data.xml @@ -0,0 +1,9 @@ + + + + + + \ No newline at end of file diff --git a/src/main/resources/db.changelog/data/2025-02-19--0002-positions-data.xml b/src/main/resources/db.changelog/data/2025-02-19--0002-positions-data.xml new file mode 100644 index 0000000..7b8f5db --- /dev/null +++ b/src/main/resources/db.changelog/data/2025-02-19--0002-positions-data.xml @@ -0,0 +1,9 @@ + + + + + + \ No newline at end of file diff --git a/src/main/resources/db.changelog/data/2025-02-19--0003-passages-data.xml b/src/main/resources/db.changelog/data/2025-02-19--0003-passages-data.xml new file mode 100644 index 0000000..28d35e5 --- /dev/null +++ b/src/main/resources/db.changelog/data/2025-02-19--0003-passages-data.xml @@ -0,0 +1,9 @@ + + + + + + \ No newline at end of file diff --git a/src/main/resources/db.changelog/data/csv/2025-02-19--0001-roles-data.csv b/src/main/resources/db.changelog/data/csv/2025-02-19--0001-roles-data.csv new file mode 100644 index 0000000..d6fbb70 --- /dev/null +++ b/src/main/resources/db.changelog/data/csv/2025-02-19--0001-roles-data.csv @@ -0,0 +1,3 @@ +role_name +ROLE_USER +ROLE_ADMIN \ No newline at end of file diff --git a/src/main/resources/db.changelog/data/csv/2025-02-19--0002-positions.csv b/src/main/resources/db.changelog/data/csv/2025-02-19--0002-positions.csv new file mode 100644 index 0000000..a99d387 --- /dev/null +++ b/src/main/resources/db.changelog/data/csv/2025-02-19--0002-positions.csv @@ -0,0 +1,4 @@ +name +Директор +Разработчик +Дизайнер \ No newline at end of file diff --git a/src/main/resources/db.changelog/data/csv/2025-02-19--0003-passages-data.csv b/src/main/resources/db.changelog/data/csv/2025-02-19--0003-passages-data.csv new file mode 100644 index 0000000..999b327 --- /dev/null +++ b/src/main/resources/db.changelog/data/csv/2025-02-19--0003-passages-data.csv @@ -0,0 +1,3 @@ +passage +Карта +Телефон \ No newline at end of file diff --git a/src/main/resources/db.changelog/db.changelog-master.xml b/src/main/resources/db.changelog/db.changelog-master.xml index ece04a5..9dedbe4 100644 --- a/src/main/resources/db.changelog/db.changelog-master.xml +++ b/src/main/resources/db.changelog/db.changelog-master.xml @@ -1,4 +1,9 @@ + + + + + \ No newline at end of file