Import résultats législatives
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
"""ajout modèles législatives
|
||||
|
||||
Revision ID: 42943ee95bdb
|
||||
Revision ID: 99948a33112b
|
||||
Revises: c0443e979a90
|
||||
Create Date: 2024-06-19 22:03:16.934581
|
||||
Create Date: 2024-06-20 12:47:52.732224
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
@ -12,7 +12,7 @@ import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = '42943ee95bdb'
|
||||
revision: str = '99948a33112b'
|
||||
down_revision: Union[str, None] = 'c0443e979a90'
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
@ -100,7 +100,7 @@ def upgrade() -> None:
|
||||
sa.Column('voix_t2', sa.Integer(), nullable=False),
|
||||
sa.ForeignKeyConstraint(['nuance_id'], ['legislatives_2022_nuance.code'], ),
|
||||
sa.ForeignKeyConstraint(['resultats_france_id'], ['legislatives_2022_resultats_france.id'], ),
|
||||
sa.PrimaryKeyConstraint('id', 'resultats_france_id')
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.create_table('legislatives_2022_voix_region',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
@ -110,13 +110,13 @@ def upgrade() -> None:
|
||||
sa.Column('voix_t2', sa.Integer(), nullable=False),
|
||||
sa.ForeignKeyConstraint(['nuance_id'], ['legislatives_2022_nuance.code'], ),
|
||||
sa.ForeignKeyConstraint(['resultats_region_id'], ['legislatives_2022_resultats_region.id'], ),
|
||||
sa.PrimaryKeyConstraint('id', 'resultats_region_id')
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.create_table('legislatives_2022_candidat',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('circonscription_id', sa.String(length=6), nullable=False),
|
||||
sa.Column('numero', sa.Integer(), nullable=False),
|
||||
sa.Column('nuance_id', sa.String(length=8), nullable=True),
|
||||
sa.Column('nuance_id', sa.String(length=8), nullable=False),
|
||||
sa.Column('bloc_id', sa.Integer(), nullable=False),
|
||||
sa.Column('nom', sa.String(length=256), nullable=False),
|
||||
sa.Column('prenom', sa.String(length=256), nullable=False),
|
||||
@ -182,7 +182,7 @@ def upgrade() -> None:
|
||||
sa.Column('voix_t2', sa.Integer(), nullable=False),
|
||||
sa.ForeignKeyConstraint(['nuance_id'], ['legislatives_2022_nuance.code'], ),
|
||||
sa.ForeignKeyConstraint(['resultats_departement_id'], ['legislatives_2022_resultats_departement.id'], ),
|
||||
sa.PrimaryKeyConstraint('id', 'resultats_departement_id')
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.create_table('legislatives_2022_resultats_bureau_vote',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
@ -214,7 +214,7 @@ def upgrade() -> None:
|
||||
sa.Column('voix_t2', sa.Integer(), nullable=False),
|
||||
sa.ForeignKeyConstraint(['candidat_id'], ['legislatives_2022_candidat.id'], ),
|
||||
sa.ForeignKeyConstraint(['resultats_circonscription_id'], ['legislatives_2022_resultats_circonscription.id'], ),
|
||||
sa.PrimaryKeyConstraint('id', 'resultats_circonscription_id')
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.create_table('legislatives_2022_voix_commune',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
@ -224,7 +224,7 @@ def upgrade() -> None:
|
||||
sa.Column('voix_t2', sa.Integer(), nullable=False),
|
||||
sa.ForeignKeyConstraint(['nuance_id'], ['legislatives_2022_nuance.code'], ),
|
||||
sa.ForeignKeyConstraint(['resultats_commune_id'], ['legislatives_2022_resultats_commune.id'], ),
|
||||
sa.PrimaryKeyConstraint('id', 'resultats_commune_id')
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.create_table('legislatives_2022_voix_bureau_vote',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
@ -234,7 +234,7 @@ def upgrade() -> None:
|
||||
sa.Column('voix_t2', sa.Integer(), nullable=False),
|
||||
sa.ForeignKeyConstraint(['candidat_id'], ['legislatives_2022_candidat.id'], ),
|
||||
sa.ForeignKeyConstraint(['resultats_bureau_vote_id'], ['legislatives_2022_resultats_bureau_vote.id'], ),
|
||||
sa.PrimaryKeyConstraint('id', 'resultats_bureau_vote_id')
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
Reference in New Issue
Block a user