mirror of
https://github.com/djrobstep/migra.git
synced 2024-09-11 13:56:05 +03:00
Implement comments
This commit is contained in:
parent
5946d144ea
commit
6fd7acda34
@ -21,6 +21,7 @@ THINGS = [
|
||||
"collations",
|
||||
"rlspolicies",
|
||||
"triggers",
|
||||
"comments",
|
||||
]
|
||||
PK = "PRIMARY KEY"
|
||||
|
||||
|
@ -111,6 +111,7 @@ class Migration(object):
|
||||
self.add(self.changes.rlspolicies(creations_only=True))
|
||||
self.add(self.changes.triggers(creations_only=True))
|
||||
self.add(self.changes.collations(drops_only=True))
|
||||
self.add(self.changes.comments(creations_only=True))
|
||||
self.add(self.changes.schemas(drops_only=True))
|
||||
|
||||
@property
|
||||
|
1
tests/FIXTURES/comments/a.sql
Normal file
1
tests/FIXTURES/comments/a.sql
Normal file
@ -0,0 +1 @@
|
||||
create table example0 (a int);
|
0
tests/FIXTURES/comments/additions.sql
Normal file
0
tests/FIXTURES/comments/additions.sql
Normal file
5
tests/FIXTURES/comments/b.sql
Normal file
5
tests/FIXTURES/comments/b.sql
Normal file
@ -0,0 +1,5 @@
|
||||
create table example (a int);
|
||||
|
||||
comment on table example is 'Example table';
|
||||
|
||||
comment on column example.a is 'Example column';
|
10
tests/FIXTURES/comments/expected.sql
Normal file
10
tests/FIXTURES/comments/expected.sql
Normal file
@ -0,0 +1,10 @@
|
||||
drop table "public"."example0";
|
||||
|
||||
create table "public"."example" (
|
||||
"a" integer
|
||||
);
|
||||
|
||||
|
||||
comment on column "public"."example"."a" is 'Example column';
|
||||
|
||||
comment on table "public"."example" is 'Example table';
|
0
tests/FIXTURES/comments/expected2.sql
Normal file
0
tests/FIXTURES/comments/expected2.sql
Normal file
@ -61,6 +61,7 @@ def test_singleschema_ext():
|
||||
|
||||
fixtures = """\
|
||||
everything
|
||||
comments
|
||||
collations
|
||||
identitycols
|
||||
partitioning
|
||||
|
Loading…
Reference in New Issue
Block a user