Remove old migrations
This commit is contained in:
parent
1f68db20fc
commit
de03ee88c0
|
@ -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())
|
|
Reference in a new issue