From de03ee88c0fda251d006160849d95799498a71ea Mon Sep 17 00:00:00 2001 From: LoRiot Date: Mon, 17 Oct 2022 19:01:29 +0300 Subject: [PATCH] Remove old migrations --- db/migrations/drop_tables.py | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 db/migrations/drop_tables.py diff --git a/db/migrations/drop_tables.py b/db/migrations/drop_tables.py deleted file mode 100644 index 607963f..0000000 --- a/db/migrations/drop_tables.py +++ /dev/null @@ -1,19 +0,0 @@ -import asyncio -import asyncpg -import os -from asyncpg.connection import Connection - - -async def drop_tables(connection: Connection): - await connection.execute("DROP TABLE users, tags, categories, projects CASCADE") - - -async def main(): - DB_URL = os.getenv("DB_URL") - connection = await asyncpg.connect(DB_URL) - await drop_tables(connection) - await connection.close() - - -if __name__ == "__main__": - asyncio.run(main())