Skip to content

Commit

Permalink
Merge pull request #318 from GiganticMinecraft/toRawSQL
Browse files Browse the repository at this point in the history
ORMの機能を使うのをやめて生のSQLに置き換える
  • Loading branch information
rito528 authored Oct 22, 2023
2 parents a753126 + 19f5096 commit b8da5c8
Show file tree
Hide file tree
Showing 35 changed files with 487 additions and 1,485 deletions.
6 changes: 0 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,6 @@ server
ドメイン(seichi-portal)を表現するのに必要な構造体およびドメイン固有ロジック(構造体の impl)を置くクレートです。
リポジトリのトレイトの定義もここに置きます(リポジトリはドメイン固有型を返す必要があることに注意してください)。

### infra/entities

SeaORM によって生成されたクレートです。
マイグレーションをした場合は、データベースを起動し `makers generate-entity` をすると更新できます。

### infra/resource

外部リソースを扱うクレートです。
Expand Down Expand Up @@ -134,5 +129,4 @@ cargo ワークスペースで共通のタスクはワークスペースのト
| lint | cargo clippy -- -D warnings | clippy によるコードチェックを行います |
| format | cargo fmt | rustfmt によるコード整形を行います |
| pretty | fix -> test -> lint -> format の順に実行します | 上記 4 つをすべて実行します、push の前に行うことが推奨されます |
| generate-entity | sea-orm-cli generate entity --database-url (DB接続リンク) -o infra/entities/src | sea-orm-cliによるエンティティファイルの生成を行います |
| generate-migrate-file <ファイル名> | sea-orm-cli migrate generate <ファイル名> | sea-orm-cliによるデータベースマイグレーションファイルを生成します。 |
11 changes: 0 additions & 11 deletions server/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ members = [
"domain",
"entrypoint",
"errors",
"infra/entities",
"infra/outgoing",
"infra/resource",
"migration",
Expand Down
4 changes: 0 additions & 4 deletions server/Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ default_to_workspace = false
__CARGO_FIX_YOLO=1
REPOSITORY_ROOT = { script = ["git rev-parse --show-superproject-working-tree --show-toplevel"] }

[tasks.generate-entity]
command = "sea-orm-cli"
args = [ "generate", "entity", "--database-url", "mysql://${MYSQL_USER}:${MYSQL_PASSWORD}@${MYSQL_HOST}/${MYSQL_DATABASE}", "-o", "infra/entities/src" ]

[tasks.generate-migrate-file]
command = "sea-orm-cli"
args = [ "migrate", "generate", "${@}" ]
Expand Down
20 changes: 0 additions & 20 deletions server/infra/entities/Cargo.toml

This file was deleted.

1 change: 0 additions & 1 deletion server/infra/entities/Makefile.toml

This file was deleted.

56 changes: 0 additions & 56 deletions server/infra/entities/src/answers.rs

This file was deleted.

32 changes: 0 additions & 32 deletions server/infra/entities/src/default_answer_title.rs

This file was deleted.

32 changes: 0 additions & 32 deletions server/infra/entities/src/default_answer_titles.rs

This file was deleted.

32 changes: 0 additions & 32 deletions server/infra/entities/src/form_choices.rs

This file was deleted.

78 changes: 0 additions & 78 deletions server/infra/entities/src/form_meta_data.rs

This file was deleted.

53 changes: 0 additions & 53 deletions server/infra/entities/src/form_questions.rs

This file was deleted.

Loading

0 comments on commit b8da5c8

Please sign in to comment.