-
Notifications
You must be signed in to change notification settings - Fork 417
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add file Liquibase and fix fe create product
- Loading branch information
Showing
3 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
14 changes: 14 additions & 0 deletions
14
product/src/main/resources/db/changelog/data/changelog-0010-product-template.sql
This file contains 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 @@ | ||
--liquibase formatted sql | ||
|
||
--changeset khanhdt:product_template1 | ||
insert into product_template (name) values | ||
('Tablet'); | ||
|
||
--changeset khanhdt:product_template2 | ||
insert into product_template (name) values | ||
('Iphone') | ||
|
||
--changeset khanhdt:product_template_attribute | ||
insert into product_attribute_template (product_attribute_id, product_template_id, display_order) values | ||
(3, 1, 0), | ||
(6, 2, 0); |
4 changes: 4 additions & 0 deletions
4
product/src/main/resources/db/changelog/ddl/changelog-0010.sql
This file contains 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,4 @@ | ||
create table product_template (id bigserial not null, created_by varchar(255), created_on timestamp(6), last_modified_by varchar(255), last_modified_on timestamp(6), name varchar(255), primary key (id)); | ||
create table product_attribute_template (id bigserial not null, product_attribute_id bigint not null, product_template_id bigint not null, display_order integer not null,primary key (id)); | ||
alter table if exists product_attribute_template add constraint FK_template_atributetemplate foreign key (product_template_id) references product_template; | ||
alter table if exists product_attribute_template add constraint FK_attribute_atributetemplate foreign key (product_attribute_id) references product_attribute; |