-
Notifications
You must be signed in to change notification settings - Fork 1
Add liquibase #97
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
Open
VladNesterov
wants to merge
3
commits into
master
Choose a base branch
from
Add_liquibase_Version01
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add liquibase #97
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
rest-api/src/main/resources/changelog/liquibase-changelog.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?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-3.1.xsd"> | ||
|
||
<include file="/db/db.changelog-1.0.xml"/> | ||
|
||
</databaseChangeLog> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
springdoc.api-docs.path=/documentation | ||
springdoc.swagger-ui.path=/documentation/view | ||
|
||
# Liquibase | ||
spring.liquibase.enabled=false | ||
spring.liquibase.change-log=classpath:/changelog/liquibase-changelog.xml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?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-3.8.xsd"> | ||
|
||
<changeSet author="vlad" id="202009071830_Create_Table_item"> | ||
<sqlFile path="/sql/202009071830_Create_Table_item.sql" | ||
relativeToChangelogFile="true" | ||
splitStatements="true" | ||
stripComments="true"/> | ||
</changeSet> | ||
|
||
<changeSet author="vlad" id="202009071831_Create_Table_receipt"> | ||
<sqlFile path="/sql/202009071831_Create_Table_receipt.sql" | ||
relativeToChangelogFile="true" | ||
splitStatements="true" | ||
stripComments="true"/> | ||
</changeSet> | ||
|
||
<changeSet author="vlad" id="202009071832_Create_Table_place"> | ||
<sqlFile path="/sql/202009071832_Create_Table_place.sql" | ||
relativeToChangelogFile="true" | ||
splitStatements="true" | ||
stripComments="true"/> | ||
</changeSet> | ||
|
||
<changeSet author="vlad" id="202009071833_Create_Table_user_profile"> | ||
<sqlFile path="/sql/202009071833_Create_Table_user_profile.sql" | ||
relativeToChangelogFile="true" | ||
splitStatements="true" | ||
stripComments="true"/> | ||
</changeSet> | ||
|
||
<changeSet author="vlad" id="202009071834_Create_Table_merchant"> | ||
<sqlFile path="/sql/202009071834_Create_Table_merchant.sql" | ||
relativeToChangelogFile="true" | ||
splitStatements="true" | ||
stripComments="true"/> | ||
</changeSet> | ||
|
||
</databaseChangeLog> |
16 changes: 16 additions & 0 deletions
16
rest-api/src/main/resources/db/sql/202009071830_Create_Table_item.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
create table IF NOT EXISTS item | ||
( | ||
id bigserial not null | ||
constraint item_pkey | ||
primary key, | ||
amount double precision not null, | ||
price double precision not null, | ||
text varchar(255) not null, | ||
receipt_id bigint | ||
constraint fk8s305nsnv4wi5iuh7kkr52gqt | ||
references receipt | ||
); | ||
|
||
alter table item | ||
owner to receipt_dev; | ||
|
27 changes: 27 additions & 0 deletions
27
rest-api/src/main/resources/db/sql/202009071831_Create_Table_receipt.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
create table IF NOT EXISTS receipt | ||
( | ||
id bigserial not null | ||
constraint receipt_pkey | ||
primary key, | ||
date timestamp not null, | ||
fd varchar(255) not null, | ||
fn varchar(255) not null, | ||
fp varchar(255) not null, | ||
provider varchar(255), | ||
status varchar(255) not null, | ||
sum double precision not null, | ||
place_id bigint | ||
constraint fk2x2wkgo5re36vwpxctma1o4s6 | ||
references place, | ||
merchant_inn varchar(255), | ||
merchant_name varchar(255), | ||
merchant_place_address varchar(255), | ||
user_profile_id varchar(255) | ||
constraint fk7n4ubagih0n1tdwvx4h7qdn5d | ||
references user_profile, | ||
load_attempts bigint default 0 | ||
); | ||
|
||
alter table receipt | ||
owner to receipt_dev; | ||
|
11 changes: 11 additions & 0 deletions
11
rest-api/src/main/resources/db/sql/202009071832_Create_Table_place.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
create table IF NOT EXISTS place | ||
( | ||
id bigserial not null | ||
constraint place_pkey | ||
primary key, | ||
text varchar(255) not null | ||
); | ||
|
||
alter table place | ||
owner to receipt_dev; | ||
|
21 changes: 21 additions & 0 deletions
21
rest-api/src/main/resources/db/sql/202009071833_Create_Table_user_profile.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
create table IF NOT EXISTS user_profile | ||
( | ||
id varchar(255) not null | ||
constraint user_profile_pkey | ||
primary key, | ||
created_at timestamp not null, | ||
updated_at timestamp, | ||
access_token varchar(255), | ||
fns_request_count integer, | ||
password varchar(255) not null, | ||
phone varchar(255) not null | ||
constraint uk_1un6sdkbtaspkwmsiferm1dhm | ||
unique, | ||
load_count integer default 0 not null, | ||
email varchar(255), | ||
name varchar(255) | ||
); | ||
|
||
alter table user_profile | ||
owner to receipt_dev; | ||
|
14 changes: 14 additions & 0 deletions
14
rest-api/src/main/resources/db/sql/202009071834_Create_Table_merchant.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
create table IF NOT EXISTS merchant | ||
( | ||
id bigserial not null | ||
constraint merchant_pkey | ||
primary key, | ||
address varchar(255) not null, | ||
inn varchar(255) not null, | ||
last_update_time timestamp not null, | ||
name varchar(255) not null | ||
); | ||
|
||
alter table merchant | ||
owner to receipt_dev; | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
давай лучше в yaml?