Skip to content

Commit

Permalink
fix: default_value in json column
Browse files Browse the repository at this point in the history
  • Loading branch information
ElaBosak233 committed Jul 27, 2024
1 parent b7e7b36 commit 98f9fa4
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 7 deletions.
26 changes: 26 additions & 0 deletions deploys/mysql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: "3.0"
services:
core:
image: elabosak233/cloudsdale:main
restart: always
ports:
- "8888:8888"
volumes:
- "./application.yml:/app/application.yml:ro"
- "/var/run/docker.sock:/var/run/docker.sock"
- "./captures:/app/captures"
- "./media:/app/media"
- "./logs:/app/logs"
depends_on:
- db

db:
image: mysql:latest
restart: always
environment:
MYSQL_USER: cloudsdale
MYSQL_PASSWORD: cloudsdale
MYSQL_DATABASE: cloudsdale
MYSQL_ROOT_PASSWORD: cloudsdale
volumes:
- "./db:/var/lib/mysql"
4 changes: 1 addition & 3 deletions deploys/docker-compose.yml → deploys/postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ services:
ports:
- "8888:8888"
volumes:
- "./application.yml:/app/application.yml:ro"
- "/var/run/docker.sock:/var/run/docker.sock"
- "./application.yml:/app/application.yml"
- "./captures:/app/captures"
- "./media:/app/media"
- "./logs:/app/logs"
Expand All @@ -17,8 +17,6 @@ services:
db:
image: postgres:alpine
restart: always
ports:
- "5432:5432"
environment:
POSTGRES_USER: cloudsdale
POSTGRES_PASSWORD: cloudsdale
Expand Down
6 changes: 3 additions & 3 deletions src/model/challenge/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ pub struct Model {
pub memory_limit: i64,
#[sea_orm(default_value = 1800)]
pub duration: i64,
#[sea_orm(column_type = "Json", default_value = "[]")]
#[sea_orm(column_type = "Json")]
pub ports: Vec<Port>,
#[sea_orm(column_type = "Json", default_value = "[]")]
#[sea_orm(column_type = "Json")]
pub envs: Vec<Env>,
#[sea_orm(column_type = "Json", default_value = "[]")]
#[sea_orm(column_type = "Json")]
pub flags: Vec<Flag>,
pub created_at: i64,
pub updated_at: i64,
Expand Down
2 changes: 1 addition & 1 deletion src/model/pod/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub struct Model {
pub team_id: Option<i64>,
pub game_id: Option<i64>,
pub challenge_id: i64,
#[sea_orm(column_type = "Json", default_value = "[]")]
#[sea_orm(column_type = "Json")]
pub nats: Vec<Nat>,
pub removed_at: i64,
pub created_at: i64,
Expand Down

0 comments on commit 98f9fa4

Please sign in to comment.