From f260a2c9e7b2f34d49ef4c2e50ce83a2361cf343 Mon Sep 17 00:00:00 2001 From: Alexis M Date: Fri, 11 Oct 2019 20:20:13 +0200 Subject: Use black to refomat the files. --- .../a67119aa3ee5_migrate_negative_weights.py | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'ihatemoney/migrations/versions/a67119aa3ee5_migrate_negative_weights.py') diff --git a/ihatemoney/migrations/versions/a67119aa3ee5_migrate_negative_weights.py b/ihatemoney/migrations/versions/a67119aa3ee5_migrate_negative_weights.py index ec23470..8061896 100644 --- a/ihatemoney/migrations/versions/a67119aa3ee5_migrate_negative_weights.py +++ b/ihatemoney/migrations/versions/a67119aa3ee5_migrate_negative_weights.py @@ -7,29 +7,29 @@ Create Date: 2018-12-25 18:34:20.220844 """ # revision identifiers, used by Alembic. -revision = 'a67119aa3ee5' -down_revision = 'afbf27e6ef20' +revision = "a67119aa3ee5" +down_revision = "afbf27e6ef20" from alembic import op import sqlalchemy as sa + # Snapshot of the person table person_helper = sa.Table( - 'person', sa.MetaData(), - sa.Column('id', sa.Integer(), nullable=False), - sa.Column('project_id', sa.String(length=64), nullable=True), - sa.Column('name', sa.UnicodeText(), nullable=True), - sa.Column('activated', sa.Boolean(), nullable=True), - sa.Column('weight', sa.Float(), nullable=True), - sa.ForeignKeyConstraint(['project_id'], ['project.id'], ), - sa.PrimaryKeyConstraint('id') + "person", + sa.MetaData(), + sa.Column("id", sa.Integer(), nullable=False), + sa.Column("project_id", sa.String(length=64), nullable=True), + sa.Column("name", sa.UnicodeText(), nullable=True), + sa.Column("activated", sa.Boolean(), nullable=True), + sa.Column("weight", sa.Float(), nullable=True), + sa.ForeignKeyConstraint(["project_id"], ["project.id"]), + sa.PrimaryKeyConstraint("id"), ) def upgrade(): op.execute( - person_helper.update() - .where(person_helper.c.weight <= 0) - .values(weight=1) + person_helper.update().where(person_helper.c.weight <= 0).values(weight=1) ) -- cgit v1.1