Commit 3b8dedcd authored by Nicolas Joyard's avatar Nicolas Joyard

Ajout champ email et twitter aux parlementaires

parent 15412416
......@@ -25,6 +25,8 @@ class Parlementaire(db.Model):
nom_complet = db.Column(db.Unicode)
sexe = db.Column(db.Enum(*SEXES.keys(), name='sexes'))
adresse = db.Column(db.Unicode)
emails = db.Column(db.Unicode)
twitter = db.Column(db.Unicode)
chambre = db.Column(db.Enum(*CHAMBRES.keys(), name='chambres'))
......
"""Ajout emails et twitter aux parlementaires
Revision ID: 2cbf8b8a98b2
Revises: 33e04063a022
Create Date: 2017-05-14 18:00:52.089982
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '2cbf8b8a98b2'
down_revision = '33e04063a022'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('parlementaires', sa.Column('emails', sa.Unicode(), nullable=True))
op.add_column('parlementaires', sa.Column('twitter', sa.Unicode(), nullable=True))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('parlementaires', 'twitter')
op.drop_column('parlementaires', 'emails')
# ### end Alembic commands ###
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment