mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-09 15:10:27 +00:00
Fix #529. Update domain serial columns type
This commit is contained in:
parent
5567886aa3
commit
8723b7d56b
@ -0,0 +1,35 @@
|
|||||||
|
"""Update domain serial columns type
|
||||||
|
|
||||||
|
Revision ID: b0fea72a3f20
|
||||||
|
Revises: 856bb94b7040
|
||||||
|
Create Date: 2019-12-20 09:18:51.541569
|
||||||
|
|
||||||
|
"""
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = 'b0fea72a3f20'
|
||||||
|
down_revision = '856bb94b7040'
|
||||||
|
branch_labels = None
|
||||||
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
with op.batch_alter_table('domain') as batch_op:
|
||||||
|
batch_op.alter_column('serial',
|
||||||
|
existing_type=sa.Integer(),
|
||||||
|
type_=sa.BigInteger())
|
||||||
|
batch_op.alter_column('notified_serial',
|
||||||
|
existing_type=sa.Integer(),
|
||||||
|
type_=sa.BigInteger())
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
with op.batch_alter_table('domain') as batch_op:
|
||||||
|
batch_op.alter_column('serial',
|
||||||
|
existing_type=sa.BigInteger(),
|
||||||
|
type_=sa.Integer())
|
||||||
|
batch_op.alter_column('notified_serial',
|
||||||
|
existing_type=sa.BigInteger(),
|
||||||
|
type_=sa.Integer())
|
@ -20,8 +20,8 @@ class Domain(db.Model):
|
|||||||
name = db.Column(db.String(255), index=True, unique=True)
|
name = db.Column(db.String(255), index=True, unique=True)
|
||||||
master = db.Column(db.String(128))
|
master = db.Column(db.String(128))
|
||||||
type = db.Column(db.String(6), nullable=False)
|
type = db.Column(db.String(6), nullable=False)
|
||||||
serial = db.Column(db.Integer)
|
serial = db.Column(db.BigInteger)
|
||||||
notified_serial = db.Column(db.Integer)
|
notified_serial = db.Column(db.BigInteger)
|
||||||
last_check = db.Column(db.Integer)
|
last_check = db.Column(db.Integer)
|
||||||
dnssec = db.Column(db.Integer)
|
dnssec = db.Column(db.Integer)
|
||||||
account_id = db.Column(db.Integer, db.ForeignKey('account.id'))
|
account_id = db.Column(db.Integer, db.ForeignKey('account.id'))
|
||||||
|
Loading…
Reference in New Issue
Block a user