|
|
"""Initial migration.
|
|
|
|
|
|
Revision ID: 8eb4774e3960
|
|
|
Revises: aa6e7ede1321
|
|
|
Create Date: 2024-06-10 15:30:29.774459
|
|
|
|
|
|
"""
|
|
|
from alembic import op
|
|
|
import sqlalchemy as sa
|
|
|
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
|
revision = '8eb4774e3960'
|
|
|
down_revision = 'aa6e7ede1321'
|
|
|
branch_labels = None
|
|
|
depends_on = None
|
|
|
|
|
|
|
|
|
def upgrade():
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
|
op.create_table('carburante',
|
|
|
sa.Column('identificador', sa.Integer(), nullable=False),
|
|
|
sa.Column('fecha', sa.Date(), nullable=True),
|
|
|
sa.Column('vehiculo', sa.String(length=20), nullable=True),
|
|
|
sa.Column('kms', sa.Integer(), nullable=True),
|
|
|
sa.Column('litros', sa.DECIMAL(precision=10, scale=3), nullable=True),
|
|
|
sa.Column('descuento', sa.DECIMAL(precision=10, scale=2), nullable=True),
|
|
|
sa.Column('precioxlitro', sa.DECIMAL(precision=10, scale=3), nullable=True),
|
|
|
sa.Column('importe', sa.DECIMAL(precision=10, scale=2), nullable=True),
|
|
|
sa.PrimaryKeyConstraint('identificador')
|
|
|
)
|
|
|
op.create_table('vehiculos',
|
|
|
sa.Column('identificador', sa.Integer(), nullable=False),
|
|
|
sa.Column('marca', sa.String(length=20), nullable=True),
|
|
|
sa.Column('modelo', sa.String(length=20), nullable=True),
|
|
|
sa.Column('matricula', sa.String(length=20), nullable=True),
|
|
|
sa.PrimaryKeyConstraint('identificador')
|
|
|
)
|
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
|
|
|
def downgrade():
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
|
op.drop_table('vehiculos')
|
|
|
op.drop_table('carburante')
|
|
|
# ### end Alembic commands ###
|