From caf100cc9a6161f898e7e355d639a8a97621cf9d Mon Sep 17 00:00:00 2001 From: IndexZero Date: Tue, 18 Feb 2025 18:52:58 +0300 Subject: [PATCH] Database Changesets --- src/main/resources/application.yml | 4 +- .../1.0/2024-10-20--0002-employee.xml | 9 +++-- .../1.0/2025-02-18--0003-authority.xml | 24 +++++++++++ .../2025-02-18--0004-employee-authorities.xml | 30 ++++++++++++++ .../1.0/2025-02-18--0005-employee-visits.xml | 40 +++++++++++++++++++ .../data/2025-02-18--0003-authority-data.xml | 14 +++++++ ...-02-18--0004-employee-authorities-data.xml | 14 +++++++ .../2025-02-18--0005-employee-visits-data.xml | 14 +++++++ .../csv/2024-10-20--0002-employee-data.csv | 10 ++--- .../csv/2025-02-18--0003-authority-data.csv | 3 ++ ...-02-18--0004-employee-authorities-data.csv | 5 +++ .../2025-02-18--0005-employee-visits-data.csv | 2 + .../db.changelog/db.changelog-master.xml | 6 +++ 13 files changed, 164 insertions(+), 11 deletions(-) create mode 100644 src/main/resources/db.changelog/1.0/2025-02-18--0003-authority.xml create mode 100644 src/main/resources/db.changelog/1.0/2025-02-18--0004-employee-authorities.xml create mode 100644 src/main/resources/db.changelog/1.0/2025-02-18--0005-employee-visits.xml create mode 100644 src/main/resources/db.changelog/data/2025-02-18--0003-authority-data.xml create mode 100644 src/main/resources/db.changelog/data/2025-02-18--0004-employee-authorities-data.xml create mode 100644 src/main/resources/db.changelog/data/2025-02-18--0005-employee-visits-data.xml create mode 100644 src/main/resources/db.changelog/data/csv/2025-02-18--0003-authority-data.csv create mode 100644 src/main/resources/db.changelog/data/csv/2025-02-18--0004-employee-authorities-data.csv create mode 100644 src/main/resources/db.changelog/data/csv/2025-02-18--0005-employee-visits-data.csv diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 3170c66..ecd62de 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -3,7 +3,7 @@ spring: name: NTO-Finals datasource: - url: jdbc:postgresql://localhost:5430/application_db + url: jdbc:postgresql://localhost:5432/application_db username: indexzero password: gkl370WVUPMgLhK driver-class-name: org.postgresql.Driver @@ -23,4 +23,4 @@ spring: show-sql: true server: - port: 8081 \ No newline at end of file + port: 8080 \ No newline at end of file diff --git a/src/main/resources/db.changelog/1.0/2024-10-20--0002-employee.xml b/src/main/resources/db.changelog/1.0/2024-10-20--0002-employee.xml index ff18226..114d118 100644 --- a/src/main/resources/db.changelog/1.0/2024-10-20--0002-employee.xml +++ b/src/main/resources/db.changelog/1.0/2024-10-20--0002-employee.xml @@ -5,7 +5,7 @@ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd"> - + @@ -25,11 +25,11 @@ - + - + @@ -37,10 +37,11 @@ - + + diff --git a/src/main/resources/db.changelog/1.0/2025-02-18--0003-authority.xml b/src/main/resources/db.changelog/1.0/2025-02-18--0003-authority.xml new file mode 100644 index 0000000..224653d --- /dev/null +++ b/src/main/resources/db.changelog/1.0/2025-02-18--0003-authority.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/db.changelog/1.0/2025-02-18--0004-employee-authorities.xml b/src/main/resources/db.changelog/1.0/2025-02-18--0004-employee-authorities.xml new file mode 100644 index 0000000..ce2dddd --- /dev/null +++ b/src/main/resources/db.changelog/1.0/2025-02-18--0004-employee-authorities.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/db.changelog/1.0/2025-02-18--0005-employee-visits.xml b/src/main/resources/db.changelog/1.0/2025-02-18--0005-employee-visits.xml new file mode 100644 index 0000000..6437d35 --- /dev/null +++ b/src/main/resources/db.changelog/1.0/2025-02-18--0005-employee-visits.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/db.changelog/data/2025-02-18--0003-authority-data.xml b/src/main/resources/db.changelog/data/2025-02-18--0003-authority-data.xml new file mode 100644 index 0000000..51563bf --- /dev/null +++ b/src/main/resources/db.changelog/data/2025-02-18--0003-authority-data.xml @@ -0,0 +1,14 @@ + + + + + + + \ No newline at end of file diff --git a/src/main/resources/db.changelog/data/2025-02-18--0004-employee-authorities-data.xml b/src/main/resources/db.changelog/data/2025-02-18--0004-employee-authorities-data.xml new file mode 100644 index 0000000..65b3590 --- /dev/null +++ b/src/main/resources/db.changelog/data/2025-02-18--0004-employee-authorities-data.xml @@ -0,0 +1,14 @@ + + + + + + + \ No newline at end of file diff --git a/src/main/resources/db.changelog/data/2025-02-18--0005-employee-visits-data.xml b/src/main/resources/db.changelog/data/2025-02-18--0005-employee-visits-data.xml new file mode 100644 index 0000000..32c0012 --- /dev/null +++ b/src/main/resources/db.changelog/data/2025-02-18--0005-employee-visits-data.xml @@ -0,0 +1,14 @@ + + + + + + + \ No newline at end of file diff --git a/src/main/resources/db.changelog/data/csv/2024-10-20--0002-employee-data.csv b/src/main/resources/db.changelog/data/csv/2024-10-20--0002-employee-data.csv index fe39a58..dc1b34d 100644 --- a/src/main/resources/db.changelog/data/csv/2024-10-20--0002-employee-data.csv +++ b/src/main/resources/db.changelog/data/csv/2024-10-20--0002-employee-data.csv @@ -1,5 +1,5 @@ -id;login;name;photo;position;last_visit -1;pivanov;Иванов Петр Федорович;https://funnyducks.ru/upload/iblock/0cd/0cdeb7ec3ed6fddda0f90fccee05557d.jpg;Разработчик;2024-02-12T08:30:00 -2;ipetrov;Петров Иван Константинович;https://funnyducks.ru/upload/iblock/0cd/0cdeb7ec3ed6fddda0f90fccee05557d.jpg;Аналитик;2024-02-13T08:35:00 -3;asemenov;Семенов Анатолий Анатольевич;https://funnyducks.ru/upload/iblock/0cd/0cdeb7ec3ed6fddda0f90fccee05557d.jpg;Разработчик;2024-02-13T08:31:00 -4;afedorov;Федоров Александр Сергеевич;https://funnyducks.ru/upload/iblock/0cd/0cdeb7ec3ed6fddda0f90fccee05557d.jpg;Тестировщик;2024-02-12T08:36:00 \ No newline at end of file +login;password;name;photo_url;position +pivanov;$2a$10$Jzb9I5eeHC0UIn/q5Rhq..wkI7KicBEZKB2u5BvnH8.n12d4alTOK;Иванов Петр Федорович;https://funnyducks.ru/upload/iblock/0cd/0cdeb7ec3ed6fddda0f90fccee05557d.jpg;Разработчик +ipetrov;$2a$10$Jzb9I5eeHC0UIn/q5Rhq..wkI7KicBEZKB2u5BvnH8.n12d4alTOK;Петров Иван Константинович;https://funnyducks.ru/upload/iblock/0cd/0cdeb7ec3ed6fddda0f90fccee05557d.jpg;Аналитик +asemenov;$2a$10$Jzb9I5eeHC0UIn/q5Rhq..wkI7KicBEZKB2u5BvnH8.n12d4alTOK;Семенов Анатолий Анатольевич;https://funnyducks.ru/upload/iblock/0cd/0cdeb7ec3ed6fddda0f90fccee05557d.jpg;Разработчик +afedorov;$2a$10$Jzb9I5eeHC0UIn/q5Rhq..wkI7KicBEZKB2u5BvnH8.n12d4alTOK;Федоров Александр Сергеевич;https://funnyducks.ru/upload/iblock/0cd/0cdeb7ec3ed6fddda0f90fccee05557d.jpg;Тестировщик \ No newline at end of file diff --git a/src/main/resources/db.changelog/data/csv/2025-02-18--0003-authority-data.csv b/src/main/resources/db.changelog/data/csv/2025-02-18--0003-authority-data.csv new file mode 100644 index 0000000..81f05e2 --- /dev/null +++ b/src/main/resources/db.changelog/data/csv/2025-02-18--0003-authority-data.csv @@ -0,0 +1,3 @@ +authority +EMPLOYEE +ADMIN \ No newline at end of file diff --git a/src/main/resources/db.changelog/data/csv/2025-02-18--0004-employee-authorities-data.csv b/src/main/resources/db.changelog/data/csv/2025-02-18--0004-employee-authorities-data.csv new file mode 100644 index 0000000..e5329ab --- /dev/null +++ b/src/main/resources/db.changelog/data/csv/2025-02-18--0004-employee-authorities-data.csv @@ -0,0 +1,5 @@ +employee_id;authorities_id +1;1 +2;2 +3;2 +4;2 \ No newline at end of file diff --git a/src/main/resources/db.changelog/data/csv/2025-02-18--0005-employee-visits-data.csv b/src/main/resources/db.changelog/data/csv/2025-02-18--0005-employee-visits-data.csv new file mode 100644 index 0000000..9430089 --- /dev/null +++ b/src/main/resources/db.changelog/data/csv/2025-02-18--0005-employee-visits-data.csv @@ -0,0 +1,2 @@ +user_id;visit_time;reader;type +1;2024-02-12T08:30:00;1;smartphone \ 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 5c0ea54..3b2a714 100644 --- a/src/main/resources/db.changelog/db.changelog-master.xml +++ b/src/main/resources/db.changelog/db.changelog-master.xml @@ -6,8 +6,14 @@ + + + + + + \ No newline at end of file