Skip to content

Commit

Permalink
Some changes to docker and set shopping carts to existing user
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonBabychP1T committed Dec 21, 2023
1 parent 981550a commit 5454d9b
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ services:
- $DEBUG_PORT:$DEBUG_PORT
environment:
SPRING_APPLICATION_JSON: '{
"spring.datasource.url" : "jdbc:mysql://mysqldb:$MYSQL_DOCKER_PORT/$MYSQL_DATABASE?serverTimezone=UTC",
"spring.datasource.url" : "jdbc:mysql://mysqldb:3306/$MYSQL_DATABASE?createDatabaseIfNotExist=true&allowPublicKeyRetrieval=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC",
"spring.datasource.username" : "$MYSQL_USER",
"spring.datasource.password" : "$MYSQL_PASSWORD",
"spring.datasource.driver-class-name" : "com.mysql.cj.jdbc.Driver",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
databaseChangeLog:
- changeSet:
id: 1-add-shopping-cart-to-default-user
author: antonbabych
changes:
- insert:
tableName: shopping_cards
columns:
- column:
name: user_id
valueNumeric: 1
- column:
name: is_deleted
value: 0
- changeSet:
id: 2-add-shopping-cart-to-default-admin
author: antonbabych
changes:
- insert:
tableName: shopping_cards
columns:
- column:
name: user_id
valueNumeric: 2
- column:
name: is_deleted
value: 0
4 changes: 3 additions & 1 deletion src/main/resources/db/changelog/db.changelog-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ databaseChangeLog:
- include:
file: db/changelog/changes/12-create-order-table.yaml
- include:
file: db/changelog/changes/13-create-order-item-table.yaml
file: db/changelog/changes/13-create-order-item-table.yaml
- include:
file: db/changelog/changes/14-set-shopping-cart-to-existing-user.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
package store.bookstoreapp;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
class BookStoreAppApplicationTests {

@Test
void contextLoads(){
}
}

0 comments on commit 5454d9b

Please sign in to comment.