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

Comments

@sqlalchemy-bot
Copy link

@sqlalchemy-bot sqlalchemy-bot commented Oct 31, 2018

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 sqlalchemy-bot commented Oct 31, 2018

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

@sqlalchemy-bot sqlalchemy-bot commented Oct 31, 2018

Changes by Michael Bayer (@zzzeek):

  • changed status to closed
@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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.