Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

system=True not generated for Column #515

Closed
sqlalchemy-bot opened this issue Oct 31, 2018 · 3 comments
Closed

system=True not generated for Column #515

sqlalchemy-bot opened this issue Oct 31, 2018 · 3 comments
Labels
autogenerate - rendering bug Something isn't working
Milestone

Comments

@sqlalchemy-bot
Copy link

Migrated issue, originally created by Michael Bayer (@zzzeek)

diff --git a/tests/test_autogen_render.py b/tests/test_autogen_render.py
index 2bc8d82..fab3cc7 100644
--- a/tests/test_autogen_render.py
+++ b/tests/test_autogen_render.py
@@ -937,6 +937,15 @@ class AutogenRenderTest(TestBase):
             "server_default='5', nullable=True))"
         )
 
+    def test_render_add_column_system(self):
+        op_obj = ops.AddColumnOp(
+            "foo", Column("xmin", Integer, system=True))
+        eq_ignore_whitespace(
+            autogenerate.render_op_text(self.autogen_context, op_obj),
+            "op.add_column('foo', sa.Column('xmin', sa.Integer(), "
+            "nullable=True, system=True))"
+        )
+
     def test_render_add_column_w_schema(self):
         op_obj = ops.AddColumnOp(
             "bar", Column("x", Integer, server_default="5"),

@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot
Copy link
Author

Michael Bayer (@zzzeek) wrote:

Dont autogenerate "system=True", render flag correctly

The system=True flag on :class:.Column, used primarily in conjunction
with the Postgresql "xmin" column, now renders within the autogenerate
render process, allowing the column to be excluded from DDL. Additionally,
adding a system=True column to a model will produce no autogenerate diff as
this column is implicitly present in the database.

Change-Id: Ie3aab9d489ebb9aecccbdf9d5b3ce8ccc42554bf
Fixes: #515

af55867

@sqlalchemy-bot
Copy link
Author

Changes by Michael Bayer (@zzzeek):

  • changed status to closed

@sqlalchemy-bot sqlalchemy-bot added autogenerate - rendering bug Something isn't working labels Nov 27, 2018
@sqlalchemy-bot sqlalchemy-bot added this to the fasttrack milestone Nov 27, 2018
vvvrrooomm pushed a commit to vvvrrooomm/alembic that referenced this issue Jan 10, 2019
The ``system=True`` flag on :class:`.Column`, used primarily in conjunction
with the Postgresql "xmin" column, now renders within the autogenerate
render process, allowing the column to be excluded from DDL.  Additionally,
adding a system=True column to a model will produce no autogenerate diff as
this column is implicitly present in the database.

Change-Id: Ie3aab9d489ebb9aecccbdf9d5b3ce8ccc42554bf
Fixes: sqlalchemy#515
vvvrrooomm pushed a commit to vvvrrooomm/alembic that referenced this issue Jan 10, 2019
The ``system=True`` flag on :class:`.Column`, used primarily in conjunction
with the Postgresql "xmin" column, now renders within the autogenerate
render process, allowing the column to be excluded from DDL.  Additionally,
adding a system=True column to a model will produce no autogenerate diff as
this column is implicitly present in the database.

Change-Id: Ie3aab9d489ebb9aecccbdf9d5b3ce8ccc42554bf
Fixes: sqlalchemy#515
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autogenerate - rendering bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant