Skip to content

Commit 2ba81ad

Browse files
gordthompsonrafiss
authored andcommitted
Implement more complete support for comments
1 parent 48a4c3c commit 2ba81ad

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

sqlalchemy_cockroachdb/base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,10 @@ class CockroachDBImpl(alembic.ddl.postgresql.PostgresqlImpl):
569569
def visit_column_type(*args, **kwargs):
570570
return alembic.ddl.postgresql.visit_column_type(*args, **kwargs)
571571

572+
@compiles(alembic.ddl.postgresql.ColumnComment, "cockroachdb")
573+
def visit_column_comment(*args, **kwargs):
574+
return alembic.ddl.postgresql.visit_column_comment(*args, **kwargs)
575+
572576

573577
# If sqlalchemy-migrate is installed, register there too.
574578
try:

test/test_suite_alembic.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,15 @@ def test_existing_table_comment_no_change(self):
3737
def test_remove_column_comment(self):
3838
pass
3939

40+
@skip("cockroachdb")
41+
def test_remove_table_comment(self):
42+
pass
43+
4044

4145
class AutogenerateComputedTest(_AutogenerateComputedTest):
46+
@skip("cockroachdb")
4247
def test_add_computed_column(self):
43-
if not (
44-
config.db.dialect.driver == "asyncpg" and not config.db.dialect._is_v231plus
45-
):
46-
super().test_add_computed_column()
48+
pass
4749

4850
@skip("cockroachdb")
4951
def test_cant_change_computed_warning(self):

0 commit comments

Comments
 (0)