diff --git a/migrations/versions/1bc993986076_.py b/migrations/versions/1bc993986076_.py deleted file mode 100644 index ef14183..0000000 --- a/migrations/versions/1bc993986076_.py +++ /dev/null @@ -1,39 +0,0 @@ -"""empty message - -Revision ID: 1bc993986076 -Revises: f0cbe56c7f2d -Create Date: 2024-10-03 12:12:39.850583 - -""" -from alembic import op -import sqlalchemy as sa - - -# revision identifiers, used by Alembic. -revision = '1bc993986076' -down_revision = 'f0cbe56c7f2d' -branch_labels = None -depends_on = None - - -def upgrade(): - # ### commands auto generated by Alembic - please adjust! ### - op.create_table('socios', - sa.Column('id', sa.Integer(), nullable=False), - sa.Column('user_id', sa.Integer(), nullable=False), - sa.Column('nombre', sa.String(length=100), nullable=False), - sa.Column('email', sa.String(length=100), nullable=False), - sa.Column('tipo_precio', sa.String(length=50), nullable=False), - sa.Column('precio', sa.Float(), nullable=True), - sa.Column('periodos_espera', sa.Float(), nullable=True), - sa.Column('incluir_peajes', sa.Boolean(), nullable=True), - sa.PrimaryKeyConstraint('id'), - sa.UniqueConstraint('email') - ) - # ### end Alembic commands ### - - -def downgrade(): - # ### commands auto generated by Alembic - please adjust! ### - op.drop_table('socios') - # ### end Alembic commands ### diff --git a/migrations/versions/5f803f77429b_.py b/migrations/versions/5f803f77429b_.py deleted file mode 100644 index 0d6264c..0000000 --- a/migrations/versions/5f803f77429b_.py +++ /dev/null @@ -1,32 +0,0 @@ -"""empty message - -Revision ID: 5f803f77429b -Revises: e3c90859bb05 -Create Date: 2024-10-02 17:09:19.782598 - -""" -from alembic import op -import sqlalchemy as sa - - -# revision identifiers, used by Alembic. -revision = '5f803f77429b' -down_revision = 'e3c90859bb05' -branch_labels = None -depends_on = None - - -def upgrade(): - # ### commands auto generated by Alembic - please adjust! ### - with op.batch_alter_table('socios', schema=None) as batch_op: - batch_op.create_foreign_key(None, 'users', ['user_id'], ['id']) - - # ### end Alembic commands ### - - -def downgrade(): - # ### commands auto generated by Alembic - please adjust! ### - with op.batch_alter_table('socios', schema=None) as batch_op: - batch_op.drop_constraint(None, type_='foreignkey') - - # ### end Alembic commands ### diff --git a/migrations/versions/85c2437114a0_.py b/migrations/versions/85c2437114a0_.py deleted file mode 100644 index 0dcd709..0000000 --- a/migrations/versions/85c2437114a0_.py +++ /dev/null @@ -1,53 +0,0 @@ -"""empty message - -Revision ID: 85c2437114a0 -Revises: d8c792fcdaca -Create Date: 2024-10-02 21:45:54.633395 - -""" -from alembic import op -import sqlalchemy as sa -from sqlalchemy.dialects import postgresql - -# revision identifiers, used by Alembic. -revision = '85c2437114a0' -down_revision = 'd8c792fcdaca' -branch_labels = None -depends_on = None - - -def upgrade(): - # ### commands auto generated by Alembic - please adjust! ### - op.create_table('socios', - sa.Column('id', sa.Integer(), nullable=False), - sa.Column('nombre', sa.String(length=100), nullable=False), - sa.Column('email', sa.String(length=100), nullable=False), - sa.Column('tipo_precio', sa.String(length=100), nullable=False), - sa.Column('precio', sa.Float(), nullable=False), - sa.Column('periodos_espera', sa.Float(), nullable=False), - sa.Column('incluir_peajes', sa.Boolean(), nullable=True), - sa.Column('user_id', sa.Integer(), nullable=False), - sa.ForeignKeyConstraint(['user_id'], ['users.id'], ), - sa.PrimaryKeyConstraint('id'), - sa.UniqueConstraint('email') - ) - op.drop_table('socio') - # ### end Alembic commands ### - - -def downgrade(): - # ### commands auto generated by Alembic - please adjust! ### - op.create_table('socio', - sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False), - sa.Column('nombre', sa.VARCHAR(length=100), autoincrement=False, nullable=False), - sa.Column('email', sa.VARCHAR(length=100), autoincrement=False, nullable=False), - sa.Column('tipo_precio', sa.VARCHAR(length=100), autoincrement=False, nullable=False), - sa.Column('precio', postgresql.DOUBLE_PRECISION(precision=53), autoincrement=False, nullable=False), - sa.Column('periodos_espera', postgresql.DOUBLE_PRECISION(precision=53), autoincrement=False, nullable=False), - sa.Column('incluir_peajes', sa.BOOLEAN(), autoincrement=False, nullable=True), - sa.Column('user_id', sa.INTEGER(), autoincrement=False, nullable=False), - sa.PrimaryKeyConstraint('id', name='socio_pkey'), - sa.UniqueConstraint('email', name='socio_email_key') - ) - op.drop_table('socios') - # ### end Alembic commands ### diff --git a/migrations/versions/88df2626220d.py b/migrations/versions/88df2626220d.py deleted file mode 100644 index d84abbf..0000000 --- a/migrations/versions/88df2626220d.py +++ /dev/null @@ -1,19 +0,0 @@ -"""Create initial migration""" - -from alembic import op -import sqlalchemy as sa - - -# revision identifiers, used by Alembic. -revision = '88df2626220d' -down_revision = None -branch_labels = None -depends_on = None - - -def upgrade() -> None: - pass # No operations to perform in this migration - - -def downgrade() -> None: - pass # No operations to reverse in this migration \ No newline at end of file diff --git a/migrations/versions/d8c792fcdaca_.py b/migrations/versions/d8c792fcdaca_.py deleted file mode 100644 index 8e66c7b..0000000 --- a/migrations/versions/d8c792fcdaca_.py +++ /dev/null @@ -1,53 +0,0 @@ -"""empty message - -Revision ID: d8c792fcdaca -Revises: 5f803f77429b -Create Date: 2024-10-02 18:16:16.779038 - -""" -from alembic import op -import sqlalchemy as sa -from sqlalchemy.dialects import postgresql - -# revision identifiers, used by Alembic. -revision = 'd8c792fcdaca' -down_revision = '5f803f77429b' -branch_labels = None -depends_on = None - - -def upgrade(): - # ### commands auto generated by Alembic - please adjust! ### - op.create_table('socio', - sa.Column('id', sa.Integer(), nullable=False), - sa.Column('nombre', sa.String(length=100), nullable=False), - sa.Column('email', sa.String(length=100), nullable=False), - sa.Column('tipo_precio', sa.String(length=100), nullable=False), - sa.Column('precio', sa.Float(), nullable=False), - sa.Column('periodos_espera', sa.Float(), nullable=False), - sa.Column('incluir_peajes', sa.Boolean(), nullable=True), - sa.Column('user_id', sa.Integer(), nullable=False), - sa.PrimaryKeyConstraint('id'), - sa.UniqueConstraint('email') - ) - op.drop_table('socios') - # ### end Alembic commands ### - - -def downgrade(): - # ### commands auto generated by Alembic - please adjust! ### - op.create_table('socios', - sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False), - sa.Column('user_id', sa.INTEGER(), autoincrement=False, nullable=False), - sa.Column('nombre', sa.VARCHAR(length=100), autoincrement=False, nullable=False), - sa.Column('email', sa.VARCHAR(length=100), autoincrement=False, nullable=False), - sa.Column('tipo_precio', sa.VARCHAR(length=50), autoincrement=False, nullable=False), - sa.Column('precio', postgresql.DOUBLE_PRECISION(precision=53), autoincrement=False, nullable=True), - sa.Column('periodos_espera', postgresql.DOUBLE_PRECISION(precision=53), autoincrement=False, nullable=True), - sa.Column('incluir_peajes', sa.BOOLEAN(), autoincrement=False, nullable=True), - sa.ForeignKeyConstraint(['user_id'], ['users.id'], name='socios_user_id_fkey'), - sa.PrimaryKeyConstraint('id', name='socios_pkey'), - sa.UniqueConstraint('email', name='socios_email_key') - ) - op.drop_table('socio') - # ### end Alembic commands ### diff --git a/migrations/versions/dcc529d4f557.py b/migrations/versions/dcc529d4f557.py new file mode 100644 index 0000000..3eb9b11 --- /dev/null +++ b/migrations/versions/dcc529d4f557.py @@ -0,0 +1,22 @@ +"""Migration description + +Revision ID: dcc529d4f557 +Revises: +Create Date: 2024-10-04 12:00:00.000000 + +""" +from alembic import op +import sqlalchemy as sa + +# revision identifiers, used by Alembic. +revision = 'dcc529d4f557' +down_revision = None # Cambia esto si hay una migración anterior +branch_labels = None +depends_on = None + +def upgrade(): + pass # Aquí irían las operaciones para actualizar la base de datos + + +def downgrade(): + pass # Aquí irían las operaciones para revertir la migración diff --git a/migrations/versions/f0cbe56c7f2d.py b/migrations/versions/f0cbe56c7f2d.py deleted file mode 100644 index f2ba4ff..0000000 --- a/migrations/versions/f0cbe56c7f2d.py +++ /dev/null @@ -1,39 +0,0 @@ -"""empty message - -Revision ID: f0cbe56c7f2d -Revises: 88df2626220d -Create Date: 2024-10-02 18:38:35.811885 - -""" -from alembic import op -import sqlalchemy as sa -from sqlalchemy.dialects import postgresql - -# revision identifiers, used by Alembic. -revision = 'f0cbe56c7f2d' -down_revision = '88df2626220d' -branch_labels = None -depends_on = None - - -def upgrade(): - # ### commands auto generated by Alembic - please adjust! ### - op.drop_table('socios') - # ### end Alembic commands ### - - -def downgrade(): - # ### commands auto generated by Alembic - please adjust! ### - op.create_table('socios', - sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False), - sa.Column('user_id', sa.INTEGER(), autoincrement=False, nullable=False), - sa.Column('nombre', sa.VARCHAR(length=100), autoincrement=False, nullable=False), - sa.Column('email', sa.VARCHAR(length=100), autoincrement=False, nullable=False), - sa.Column('tipo_precio', sa.VARCHAR(length=50), autoincrement=False, nullable=False), - sa.Column('precio', postgresql.DOUBLE_PRECISION(precision=53), autoincrement=False, nullable=True), - sa.Column('periodos_espera', postgresql.DOUBLE_PRECISION(precision=53), autoincrement=False, nullable=True), - sa.Column('incluir_peajes', sa.BOOLEAN(), autoincrement=False, nullable=True), - sa.PrimaryKeyConstraint('id', name='socios_pkey'), - sa.UniqueConstraint('email', name='socios_email_key') - ) - # ### end Alembic commands ### \ No newline at end of file diff --git a/src/front/js/component/panelControl.js b/src/front/js/component/panelControl.js index cdfdc3e..d31058d 100644 --- a/src/front/js/component/panelControl.js +++ b/src/front/js/component/panelControl.js @@ -15,6 +15,11 @@ const ControlPanel = ({ onLogout }) => { window.location.href = process.env.REACT_APP_BACKEND_URL; }; + const handleClick = () => { + // Cambiar la ubicación y recargar la página + window.location.href = '/profile'; + }; + return (

Panel de Control

@@ -50,11 +55,9 @@ const ControlPanel = ({ onLogout }) => { - - - +