35 lines
677 B
Python
35 lines
677 B
Python
"""
|
|
This module contains a Caribou migration.
|
|
|
|
Migration Name: external_auth_json
|
|
Migration Version: 20250113142241
|
|
"""
|
|
|
|
|
|
def upgrade(connection):
|
|
"""remove tables:
|
|
- external_auth
|
|
- user_external_auth
|
|
add column to users table:
|
|
- external_auth JSON
|
|
"""
|
|
sql = """
|
|
DROP TABLE IF EXISTS external_auth;
|
|
"""
|
|
connection.execute(sql)
|
|
|
|
sql = """
|
|
DROP TABLE IF EXISTS user_external_auth;
|
|
"""
|
|
connection.execute(sql)
|
|
|
|
sql = """
|
|
ALTER TABLE users ADD COLUMN external_auth JSON;
|
|
"""
|
|
connection.execute(sql)
|
|
connection.commit()
|
|
|
|
|
|
def downgrade(connection):
|
|
# add your downgrade step here
|
|
pass
|