Browse Source

#3 unsigned_big_integer だっけ?

main
みてるぞ 1 month ago
parent
commit
3803314792
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      migration.py

+ 4
- 4
migration.py View File

@@ -28,7 +28,7 @@ def create_queries (
) -> None:
with SCHEMA.create ('queries') as table:
table.big_increments ('id')
table.big_integer ('user_id').nullable ().comment ('クエリ主').unsigned ()
table.unsigned_big_integer ('user_id').nullable ().comment ('クエリ主')
table.integer ('target_character').comment ('クエリ先キャラクタ')
table.text ('content').comment ('クエリ内容')
table.string ('image_url').nullable ().default (None).comment ('添附画像 URL')
@@ -42,7 +42,7 @@ def create_answers (
) -> None:
with SCHEMA.create ('answers') as table:
table.big_increments ('id')
table.big_integer ('query_id').nullable ().comment ('クエリ').unsigned ()
table.unsigned_big_integer ('query_id').nullable ().comment ('クエリ')
table.integer ('character').comment ('キャラクタ区分')
table.text ('content').comment ('回答内容')
table.integer ('answer_type').comment ('回答区分')
@@ -65,8 +65,8 @@ def create_query_answer_histories (
) -> None:
with SCHEMA.create ('query_answer_histories') as table:
table.big_increments ('id')
table.big_integer ('query_id').unsigned ()
table.big_integer ('answer_id').unsigned ()
table.unsigned_big_integer ('query_id')
table.unsigned_big_integer ('answer_id')
table.unique (['query_id', 'answer_id'])




Loading…
Cancel
Save