typo
This commit is contained in:
parent
f91f7e5274
commit
bda9e387c1
1 changed files with 2 additions and 1 deletions
|
@ -21,7 +21,7 @@ def upgrade():
|
|||
sql = text("""INSERT INTO pool VALUES (
|
||||
-1, 'Hot spares (reserve)', NOW(), NOW(), NULL, 'hotspare',
|
||||
md5(to_char(NOW(), 'YYYY-MM-DD HH24:MI:SS.US')), NULL) ON CONFLICT (id) DO NOTHING;""")
|
||||
elif op.get_context().dialect == 'sqlite':
|
||||
elif op.get_context().dialect.name == 'sqlite':
|
||||
sql = text(f"""INSERT OR IGNORE INTO pool VALUES (
|
||||
-1, 'Hot spares (reserve)', datetime('now'), datetime('now'), NULL, 'hotspare',
|
||||
CAST(RANDOM() AS TEXT), NULL);""")
|
||||
|
@ -30,6 +30,7 @@ def upgrade():
|
|||
"You could do this migration manually.")
|
||||
op.execute(sql)
|
||||
|
||||
|
||||
def downgrade():
|
||||
# SQL to undo the changes
|
||||
sql = text("""DELETE FROM pool WHERE id = -1;""")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue