Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
long2ice committed Apr 5, 2021
1 parent 44fd2fe commit 922e3ee
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/test_ddl.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,11 @@ def test_modify_column():
def test_alter_column_default():
if isinstance(Migrate.ddl, SqliteDDL):
return
ret = Migrate.ddl.alter_column_default(
Category, Category._meta.fields_map.get("name").describe(False)
)
ret = Migrate.ddl.alter_column_default(User, User._meta.fields_map.get("intro").describe(False))
if isinstance(Migrate.ddl, PostgresDDL):
assert ret == 'ALTER TABLE "category" ALTER COLUMN "name" DROP DEFAULT'
assert ret == 'ALTER TABLE "user" ALTER COLUMN "intro" SET DEFAULT \'\''
elif isinstance(Migrate.ddl, MysqlDDL):
assert ret == "ALTER TABLE `category` ALTER COLUMN `name` DROP DEFAULT"
assert ret == "ALTER TABLE `user` ALTER COLUMN `intro` SET DEFAULT ''"

ret = Migrate.ddl.alter_column_default(
Category, Category._meta.fields_map.get("created_at").describe(False)
Expand Down

0 comments on commit 922e3ee

Please sign in to comment.