From 069d50c8acaf40de96dfc74e3216caf91376d27b Mon Sep 17 00:00:00 2001 From: miteruzo Date: Wed, 27 Nov 2024 01:55:40 +0900 Subject: [PATCH] =?UTF-8?q?#3=20=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- migration.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/migration.py b/migration.py index 615d5f2..8849e01 100644 --- a/migration.py +++ b/migration.py @@ -21,7 +21,6 @@ def main ( create_answers () create_users () create_query_answer_histories () - add_constraints_to_answers () add_constraints_to_query_answer_histories () @@ -51,12 +50,6 @@ def create_answers ( table.boolean ('answered').default (False).comment ('回答済') -def add_constraints_to_answers ( -) -> None: - with SCHEMA.table ('answers') as table: - table.foreign ('query_id').references ('id').on ('queries').on_update ('cascade').on_delete ('restrict') - - def create_users ( ) -> None: with SCHEMA.create ('users') as table: