Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Start database
run: docker compose -f dev.docker-compose.yml up -d
- name: Migrate database
run: cd editor-server && cargo prisma migrate dev --skip-generate --name init
run: cd editor-server && set -a && source .env && set +a && cargo run -p migration -- up
- name: Build and clippy check
run: cargo clippy --manifest-path ./editor-server/Cargo.toml
- name: fmt check
Expand All @@ -29,4 +29,4 @@ jobs:
- name: build test and clippy check
run: cargo clippy --manifest-path ./file-server/Cargo.toml
- name: fmt check
run: cargo fmt --manifest-path ./file-server/Cargo.toml
run: cargo fmt --manifest-path ./file-server/Cargo.toml
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ docker compose -f dev.docker-compose.yml up -d
migrate the database

```sh
# in Lightdance-Editor/editor-server
cargo prisma migrate dev --skip-generate --name init
# in Lightdance-Editor/editor-server/sea-orm
DATABASE_URL="mysql://root:password@localhost:3306/editor" sea-orm-cli migrate up
DATABASE_URL="mysql://root:password@localhost:3306/editor" sea-orm-cli generate entity -o sea-orm/src/entity
```

#### Install the dependencies
Expand Down Expand Up @@ -139,7 +140,8 @@ migrate the database

```sh
# in Lightdance-Editor/editor-server
cargo prisma migrate dev --skip-generate --name init
DATABASE_URL="mysql://root:password@localhost:3306/editor" sea-orm-cli migrate up
DATABASE_URL="mysql://root:password@localhost:3306/editor" sea-orm-cli generate entity -o sea-orm/src/entity
```

Start all services
Expand Down
2 changes: 1 addition & 1 deletion editor-server/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[alias]
prisma = "run -p prisma --"
migrate = "run -p migration --"
5 changes: 2 additions & 3 deletions editor-server/.env.development
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ DATABASE_URL="mysql://root:password@localhost:3306/editor"
EXPIRATION_TIME_HOURS=24
AUTH0_DOMAIN=dev-fz1bb1rnqkxgp6wr.us.auth0.com
AUTH0_CLIENT_ID=7xfl2SdpyQoDLFGJQrLv0u5oi7jmgKUw
AUTH0_CLIENT_SECRET=

AUTH0_TEST_USERNAME=test_user2
AUTH0_TEST_PASSWORD=fOObAR123456
AUTH0_TEST_USER_ID=2
AUTH0_TEST_TOKEN=testToken
AUTH0_TEST_TOKEN=testToken
2 changes: 1 addition & 1 deletion editor-server/.env.production
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ DATABASE_URL="mysql://root:password@mysql:3306/editor"
EXPIRATION_TIME_HOURS=24
AUTH0_DOMAIN=dev-fz1bb1rnqkxgp6wr.us.auth0.com
AUTH0_CLIENT_ID=7xfl2SdpyQoDLFGJQrLv0u5oi7jmgKUw
AUTH0_CLIENT_SECRET=
AUTH0_CLIENT_SECRET=
6 changes: 0 additions & 6 deletions editor-server/.gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
src/prisma/
target/

prisma/migrations
schema.graphql

src/prisma
Loading
Loading