Skip to content

Favorites #646

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 149 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
c016c61
demo commit
Irvin-Mx Apr 25, 2025
5c8c49e
Merge pull request #1 from Irvin-Mx/vista-home
SebastianGN1590 Apr 25, 2025
f0fd9f8
feat model de usuario
JuanEspinoH Apr 25, 2025
a66125d
Merge pull request #2 from Irvin-Mx/modelo_de_usuario
JuanEspinoH Apr 25, 2025
1cfdbb9
prueba
SebastianGN1590 Apr 25, 2025
1e258aa
Merge pull request #3 from Irvin-Mx/registro_usuario
Irvin-Mx Apr 25, 2025
1cc35d5
fix modelo de usuario
JuanEspinoH Apr 25, 2025
8cbac88
Merge pull request #4 from Irvin-Mx/ruta_sign_up
SebastianGN1590 Apr 26, 2025
aa102e0
/feat vista home navbar
Irvin-Mx Apr 26, 2025
9313bc1
Formulario primera parate para log in
SebastianGN1590 Apr 26, 2025
9e8afde
formulario 1 cambio
SebastianGN1590 Apr 26, 2025
92f2711
cambios en formulario
SebastianGN1590 Apr 26, 2025
39dfbfc
Merge pull request #7 from Irvin-Mx/usuario_registro
SebastianGN1590 Apr 26, 2025
56aef95
Merge pull request #8 from Irvin-Mx/vista-home
JuanEspinoH Apr 26, 2025
d7c1884
vista de formulario completada solo diseno
SebastianGN1590 Apr 26, 2025
4f0d3fb
vista de formulario terminada
SebastianGN1590 Apr 26, 2025
bf4c471
formaulario para registro
SebastianGN1590 Apr 28, 2025
7e913e8
Merge pull request #9 from Irvin-Mx/“regsitro_para_el_usuario”
Irvin-Mx Apr 28, 2025
a8a8949
ruta isgn up
JuanEspinoH Apr 28, 2025
0beec89
Merge pull request #11 from Irvin-Mx/ruta_sign_up
SebastianGN1590 Apr 28, 2025
035b1fc
Create card
Irvin-Mx Apr 28, 2025
841a210
feat ruta log in
JuanEspinoH Apr 28, 2025
82d5cfb
Merge pull request #12 from Irvin-Mx/ruta_log_in
Irvin-Mx Apr 28, 2025
76f8295
fix ruta log in
JuanEspinoH Apr 28, 2025
7a0eba8
Merge pull request #13 from Irvin-Mx/ruta_log_in
JuanEspinoH Apr 28, 2025
d791f88
feat modelo de servicio y relacion con usuario
JuanEspinoH Apr 28, 2025
57868c3
Modify navbar and home styles
Irvin-Mx Apr 28, 2025
e61fd37
formulario funcionando
SebastianGN1590 Apr 28, 2025
2138b5c
formulario terminado
SebastianGN1590 Apr 28, 2025
d256ee9
formulario estilos
SebastianGN1590 Apr 28, 2025
4c6cfc0
Feature vista home
Irvin-Mx Apr 28, 2025
072414f
Clean navbar.js
Irvin-Mx Apr 28, 2025
97d413d
formulario listo
SebastianGN1590 Apr 28, 2025
304231a
Fix navbar register button
Irvin-Mx Apr 28, 2025
c2cbbfb
ruta para user y service
JuanEspinoH Apr 28, 2025
13d4f6a
Merge pull request #16 from Irvin-Mx/usuario_registro
JuanEspinoH Apr 28, 2025
8b45275
Merge pull request #18 from Irvin-Mx/vista-home
JuanEspinoH Apr 28, 2025
36070cc
Merge pull request #17 from Irvin-Mx/modelo_service
Irvin-Mx Apr 28, 2025
a70daa7
fix registro
JuanEspinoH Apr 28, 2025
a74ff9d
Merge pull request #19 from Irvin-Mx/test_sign_up
Irvin-Mx Apr 28, 2025
23a6897
feat funcin checkUser
JuanEspinoH Apr 29, 2025
18f6a89
Modified navbar, create login view
Irvin-Mx Apr 29, 2025
42e1111
Merge pull request #20 from Irvin-Mx/check_log_in_user
Irvin-Mx Apr 29, 2025
108dfee
login funcion flux
Irvin-Mx Apr 29, 2025
6219b35
Merge branch 'develop' into vista-login
JuanEspinoH Apr 29, 2025
ba3fbac
Merge pull request #22 from Irvin-Mx/vista-login
JuanEspinoH Apr 29, 2025
5158e46
fix flux storage
JuanEspinoH Apr 29, 2025
29504fb
Merge pull request #23 from Irvin-Mx/fix_flux
JuanEspinoH Apr 29, 2025
68eff73
Feature login
Irvin-Mx Apr 29, 2025
643d3d1
feature vista-login
Irvin-Mx Apr 29, 2025
7a80b78
feature vista de login
Irvin-Mx Apr 29, 2025
af55cce
Merge pull request #25 from Irvin-Mx/vista-login
JuanEspinoH Apr 29, 2025
e1737a7
feat vista de busqueda
JuanEspinoH Apr 29, 2025
3b16619
Merge pull request #26 from Irvin-Mx/vista_busqueda
Irvin-Mx Apr 29, 2025
02a6bc7
Modify navbar.js , flux.js and Login.jsx
Irvin-Mx Apr 29, 2025
71e3b0c
Merge pull request #27 from Irvin-Mx/vista-login
JuanEspinoH Apr 29, 2025
4c35c16
interface
SebastianGN1590 Apr 29, 2025
e32ddaf
Merge branch 'develop' into perfil_freelance
JuanEspinoH Apr 29, 2025
0d5c689
Merge pull request #28 from Irvin-Mx/perfil_freelance
Irvin-Mx Apr 29, 2025
d3703cd
backend buqueda
JuanEspinoH Apr 29, 2025
2adfa6a
Merge pull request #29 from Irvin-Mx/backend_busqueda
JuanEspinoH Apr 29, 2025
61a855d
paquetes de usuario
SebastianGN1590 Apr 29, 2025
2920185
Merge pull request #30 from Irvin-Mx/“paquetes_de_freelance”
Irvin-Mx Apr 29, 2025
f84ffa9
Create DetalladoDeOrden.jsx
Irvin-Mx Apr 29, 2025
29c8d18
feat busqueda
JuanEspinoH Apr 29, 2025
5eab8a3
Merge pull request #31 from Irvin-Mx/backend_buqueda
Irvin-Mx Apr 29, 2025
b64973c
Merge branch 'develop' into vista-detallado-de-orden
JuanEspinoH Apr 30, 2025
d81663e
Merge pull request #32 from Irvin-Mx/vista-detallado-de-orden
SebastianGN1590 Apr 30, 2025
ded0500
paginas_nombres_modificadas
SebastianGN1590 Apr 30, 2025
64be847
Merge branch 'develop' into funcion_freelance
SebastianGN1590 Apr 30, 2025
10b2816
Merge pull request #33 from Irvin-Mx/funcion_freelance
Irvin-Mx Apr 30, 2025
c577ab1
front vista ordenes
JuanEspinoH Apr 30, 2025
9463940
Merge pull request #34 from Irvin-Mx/vista_tabla_ordenes
JuanEspinoH Apr 30, 2025
0d6583a
Create vista de detallado de orden
Irvin-Mx Apr 30, 2025
34b5918
Merge branch 'develop' into vista-detallado-orden
Irvin-Mx Apr 30, 2025
026e098
Merge pull request #35 from Irvin-Mx/vista-detallado-orden
JuanEspinoH Apr 30, 2025
f7ea9e6
trae perfil de usuario la vista freelance
SebastianGN1590 Apr 30, 2025
f2630c6
Merge branch 'develop' into vista_freelance
SebastianGN1590 Apr 30, 2025
8b64837
Merge pull request #36 from Irvin-Mx/vista_freelance
JuanEspinoH Apr 30, 2025
390a1f0
Ruta para crear orden
Irvin-Mx Apr 30, 2025
5db62ca
funcionalidad en el perfil del freelance
SebastianGN1590 Apr 30, 2025
2fa25f3
Merge pull request #37 from Irvin-Mx/freelance_perfil
JuanEspinoH Apr 30, 2025
035982b
Modify ruta base create-order
Irvin-Mx Apr 30, 2025
5b9f8ac
fix navbar busqueda
JuanEspinoH Apr 30, 2025
d07d1ee
Merge pull request #38 from Irvin-Mx/navbar
JuanEspinoH May 1, 2025
face740
cambios mejoar pagina de vista
JuanEspinoH May 2, 2025
f4948f1
Merge pull request #39 from Irvin-Mx/fixes
Irvin-Mx May 2, 2025
1e1cd76
Fix order routes
Irvin-Mx May 2, 2025
453fcfb
Merge develop to vista-detallado-orden
Irvin-Mx May 2, 2025
039b204
Order routes
Irvin-Mx May 2, 2025
acd9f83
Merge pull request #40 from Irvin-Mx/vista-detallado-orden
JuanEspinoH May 2, 2025
0b355df
flujo del freelance
SebastianGN1590 May 2, 2025
d24d378
Merge branch 'develop' into “flujo_para_freelance”
SebastianGN1590 May 2, 2025
ad5b3ec
Merge pull request #41 from Irvin-Mx/“flujo_para_freelance”
JuanEspinoH May 2, 2025
f4814c5
paypal y toast
JuanEspinoH May 2, 2025
ee39a4f
Merge pull request #42 from Irvin-Mx/paypal
Irvin-Mx May 2, 2025
e8e6eb0
cambios en formulario
SebastianGN1590 May 3, 2025
18f39ac
ordenes
JuanEspinoH May 3, 2025
503969c
Merge pull request #43 from Irvin-Mx/ordenes
Irvin-Mx May 3, 2025
d60e788
vista_freelance_flujo
SebastianGN1590 May 3, 2025
7533ae1
Merge branch 'develop' into freelance_producto
JuanEspinoH May 3, 2025
3bae507
Merge pull request #44 from Irvin-Mx/freelance_producto
JuanEspinoH May 3, 2025
4acbb92
fix
JuanEspinoH May 3, 2025
60790ca
Merge pull request #45 from Irvin-Mx/fix
SebastianGN1590 May 3, 2025
951e433
first sprint fixes
JuanEspinoH May 4, 2025
756819e
Merge pull request #46 from Irvin-Mx/first_sprint
SebastianGN1590 May 4, 2025
e2355db
first sprint fixes 2
JuanEspinoH May 4, 2025
aca19de
Merge pull request #47 from Irvin-Mx/first_sprint
Irvin-Mx May 4, 2025
21aedab
imagenes
JuanEspinoH May 5, 2025
c22dd2b
freelance terminado
SebastianGN1590 May 5, 2025
c531381
Merge pull request #48 from Irvin-Mx/imagenes
JuanEspinoH May 5, 2025
74a2f32
Merge branch 'develop' into freelance_configuracion_pagina
SebastianGN1590 May 6, 2025
e5547a6
Merge pull request #49 from Irvin-Mx/freelance_configuracion_pagina
JuanEspinoH May 6, 2025
04c8576
pefil_freelance_funcionando
SebastianGN1590 May 7, 2025
cc13afe
comments
JuanEspinoH May 7, 2025
6acfb22
Merge pull request #50 from Irvin-Mx/edicion_de_home
Irvin-Mx May 7, 2025
edd5d40
Merge branch 'develop' into comments
JuanEspinoH May 7, 2025
95e0adb
Merge pull request #51 from Irvin-Mx/comments
SebastianGN1590 May 7, 2025
8a79b6a
favorites model ,favorites route
Irvin-Mx May 7, 2025
b6bdfaa
favorites get route
Irvin-Mx May 7, 2025
0d68e41
Favorites
Irvin-Mx May 7, 2025
cf1cc59
validaciones
JuanEspinoH May 7, 2025
0311286
permisos con verificaciones por arreglar
SebastianGN1590 May 7, 2025
88ac2e2
Merge pull request #52 from Irvin-Mx/validaciones
Irvin-Mx May 7, 2025
9ee0d49
Merge branch 'develop' into edicion_de_roles
SebastianGN1590 May 7, 2025
597e03c
Merge pull request #53 from Irvin-Mx/edicion_de_roles
JuanEspinoH May 7, 2025
3a35185
Merge branch 'develop' into favorites
Irvin-Mx May 7, 2025
4ee4de0
Merge pull request #54 from Irvin-Mx/favorites
Irvin-Mx May 7, 2025
e20047b
fixes login
JuanEspinoH May 7, 2025
151abbc
Merge pull request #55 from Irvin-Mx/fixes22
JuanEspinoH May 7, 2025
4ada0e0
fix/cambios_navbar
SebastianGN1590 May 8, 2025
0f34ecb
comments front
JuanEspinoH May 8, 2025
ce734e9
arreglando vista de freelance
SebastianGN1590 May 8, 2025
215b7de
Favorites all favorites view
Irvin-Mx May 8, 2025
8856ad4
Merge pull request #56 from Irvin-Mx/acomodo_de_ramas
JuanEspinoH May 8, 2025
238fa1f
Merge branch 'develop' into commnets_front
JuanEspinoH May 8, 2025
3924acf
Merge pull request #57 from Irvin-Mx/commnets_front
Irvin-Mx May 8, 2025
c7e29d8
Merge branch 'develop' into favorites-front
Irvin-Mx May 8, 2025
6b3ff52
Merge pull request #58 from Irvin-Mx/favorites-front
JuanEspinoH May 8, 2025
122c62d
arreglo_freelance
SebastianGN1590 May 8, 2025
001d3e4
Merge pull request #59 from Irvin-Mx/acomodo_de_ramas
JuanEspinoH May 8, 2025
43cf3d7
error corregido
SebastianGN1590 May 9, 2025
f86637c
barra
JuanEspinoH May 9, 2025
664b8bf
cambios en flujo de freelance con imagenes
SebastianGN1590 May 9, 2025
c179a33
Merge pull request #60 from Irvin-Mx/barra
JuanEspinoH May 9, 2025
a7b68c7
Merge branch 'develop' into cambio_en_flujo
SebastianGN1590 May 9, 2025
62a5af3
Merge pull request #61 from Irvin-Mx/cambio_en_flujo
JuanEspinoH May 9, 2025
466f5b1
favorites
Irvin-Mx May 9, 2025
aff8007
Merge branch 'develop' into favorites
JuanEspinoH May 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ DEBUG=TRUE
# Front-End Variables
BASENAME=/
#BACKEND_URL=
#CLOUDINARY_API_KEY=
#CLOUDINARY_API_SECRET=
#PAYPAL_CLIENT_ID=
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,11 @@
"editor.defaultFormatter": "esbenp.prettier-vscode",
"workbench.editorAssociations": {
"*.md": "vscode.markdown.preview.editor"
},
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[javascriptreact]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
}
}
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ flask-admin = "*"
typing-extensions = "*"
flask-jwt-extended = "==4.6.0"
wtforms = "==3.1.2"
flask-bcrypt = "*"

[requires]
python_version = "3.10"
Expand Down
701 changes: 404 additions & 297 deletions Pipfile.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous">
<link rel="shortcut icon" href="./4geeks.ico"></head>
<body class="h-100">
<div id="app" class="h-100"></div>
<script type="text/javascript" src="./bundle.js"></script>

</body>
</html>
1 change: 1 addition & 0 deletions migrations/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Single-database configuration for Flask.
50 changes: 50 additions & 0 deletions migrations/alembic.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# A generic, single database configuration.

[alembic]
# template used to generate migration files
# file_template = %%(rev)s_%%(slug)s

# set to 'true' to run the environment during
# the 'revision' command, regardless of autogenerate
# revision_environment = false


# Logging configuration
[loggers]
keys = root,sqlalchemy,alembic,flask_migrate

[handlers]
keys = console

[formatters]
keys = generic

[logger_root]
level = WARN
handlers = console
qualname =

[logger_sqlalchemy]
level = WARN
handlers =
qualname = sqlalchemy.engine

[logger_alembic]
level = INFO
handlers =
qualname = alembic

[logger_flask_migrate]
level = INFO
handlers =
qualname = flask_migrate

[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic

[formatter_generic]
format = %(levelname)-5.5s [%(name)s] %(message)s
datefmt = %H:%M:%S
113 changes: 113 additions & 0 deletions migrations/env.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
import logging
from logging.config import fileConfig

from flask import current_app

from alembic import context

# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
config = context.config

# Interpret the config file for Python logging.
# This line sets up loggers basically.
fileConfig(config.config_file_name)
logger = logging.getLogger('alembic.env')


def get_engine():
try:
# this works with Flask-SQLAlchemy<3 and Alchemical
return current_app.extensions['migrate'].db.get_engine()
except (TypeError, AttributeError):
# this works with Flask-SQLAlchemy>=3
return current_app.extensions['migrate'].db.engine


def get_engine_url():
try:
return get_engine().url.render_as_string(hide_password=False).replace(
'%', '%%')
except AttributeError:
return str(get_engine().url).replace('%', '%%')


# add your model's MetaData object here
# for 'autogenerate' support
# from myapp import mymodel
# target_metadata = mymodel.Base.metadata
config.set_main_option('sqlalchemy.url', get_engine_url())
target_db = current_app.extensions['migrate'].db

# other values from the config, defined by the needs of env.py,
# can be acquired:
# my_important_option = config.get_main_option("my_important_option")
# ... etc.


def get_metadata():
if hasattr(target_db, 'metadatas'):
return target_db.metadatas[None]
return target_db.metadata


def run_migrations_offline():
"""Run migrations in 'offline' mode.

This configures the context with just a URL
and not an Engine, though an Engine is acceptable
here as well. By skipping the Engine creation
we don't even need a DBAPI to be available.

Calls to context.execute() here emit the given string to the
script output.

"""
url = config.get_main_option("sqlalchemy.url")
context.configure(
url=url, target_metadata=get_metadata(), literal_binds=True
)

with context.begin_transaction():
context.run_migrations()


def run_migrations_online():
"""Run migrations in 'online' mode.

In this scenario we need to create an Engine
and associate a connection with the context.

"""

# this callback is used to prevent an auto-migration from being generated
# when there are no changes to the schema
# reference: http://alembic.zzzcomputing.com/en/latest/cookbook.html
def process_revision_directives(context, revision, directives):
if getattr(config.cmd_opts, 'autogenerate', False):
script = directives[0]
if script.upgrade_ops.is_empty():
directives[:] = []
logger.info('No changes in schema detected.')

conf_args = current_app.extensions['migrate'].configure_args
if conf_args.get("process_revision_directives") is None:
conf_args["process_revision_directives"] = process_revision_directives

connectable = get_engine()

with connectable.connect() as connection:
context.configure(
connection=connection,
target_metadata=get_metadata(),
**conf_args
)

with context.begin_transaction():
context.run_migrations()


if context.is_offline_mode():
run_migrations_offline()
else:
run_migrations_online()
24 changes: 24 additions & 0 deletions migrations/script.py.mako
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
"""${message}

Revision ID: ${up_revision}
Revises: ${down_revision | comma,n}
Create Date: ${create_date}

"""
from alembic import op
import sqlalchemy as sa
${imports if imports else ""}

# revision identifiers, used by Alembic.
revision = ${repr(up_revision)}
down_revision = ${repr(down_revision)}
branch_labels = ${repr(branch_labels)}
depends_on = ${repr(depends_on)}


def upgrade():
${upgrades if upgrades else "pass"}


def downgrade():
${downgrades if downgrades else "pass"}
38 changes: 38 additions & 0 deletions migrations/versions/a8a59e6331ba_.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
"""empty message

Revision ID: a8a59e6331ba
Revises: e2ca046dde9e
Create Date: 2025-05-09 22:02:35.938934

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'a8a59e6331ba'
down_revision = 'e2ca046dde9e'
branch_labels = None
depends_on = None


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('comments', schema=None) as batch_op:
batch_op.create_unique_constraint(None, ['id'])

with op.batch_alter_table('orders', schema=None) as batch_op:
batch_op.create_unique_constraint(None, ['id'])

# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('orders', schema=None) as batch_op:
batch_op.drop_constraint(None, type_='unique')

with op.batch_alter_table('comments', schema=None) as batch_op:
batch_op.drop_constraint(None, type_='unique')

# ### end Alembic commands ###
95 changes: 95 additions & 0 deletions migrations/versions/b7278cf88f23_.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
"""empty message

Revision ID: b7278cf88f23
Revises:
Create Date: 2025-05-08 23:42:06.432792

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'b7278cf88f23'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('users',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('email', sa.String(length=50), nullable=False),
sa.Column('name', sa.String(length=50), nullable=False),
sa.Column('last_name', sa.String(length=50), nullable=False),
sa.Column('password', sa.String(length=120), nullable=False),
sa.Column('phone', sa.String(length=20), nullable=False),
sa.Column('address', sa.String(length=200), nullable=False),
sa.Column('rol', sa.String(length=20), nullable=False),
sa.Column('service_description', sa.String(length=300), nullable=True),
sa.Column('service_title', sa.String(length=100), nullable=True),
sa.Column('profile_description', sa.String(length=800), nullable=True),
sa.Column('balance', sa.Integer(), nullable=True),
sa.Column('img_url', sa.String(), nullable=True),
sa.Column('is_active', sa.Boolean(), nullable=False),
sa.Column('created_at', sa.DateTime(timezone=True), nullable=False),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('email')
)
op.create_table('comments',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('text', sa.String(length=200), nullable=False),
sa.Column('stars', sa.Integer(), nullable=False),
sa.Column('user_id', sa.Integer(), nullable=True),
sa.Column('freelance_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['freelance_id'], ['users.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('id')
)
op.create_table('favoritos',
sa.Column('usuario_id', sa.Integer(), nullable=False),
sa.Column('favorito_id', sa.Integer(), nullable=False),
sa.ForeignKeyConstraint(['favorito_id'], ['users.id'], ),
sa.ForeignKeyConstraint(['usuario_id'], ['users.id'], ),
sa.PrimaryKeyConstraint('usuario_id', 'favorito_id')
)
op.create_table('services',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('title', sa.String(length=100), nullable=True),
sa.Column('price', sa.DECIMAL(precision=10, scale=2), nullable=True),
sa.Column('time', sa.String(length=50), nullable=True),
sa.Column('description', sa.String(length=200), nullable=True),
sa.Column('img_url', sa.String(), nullable=True),
sa.Column('category', sa.String(length=50), nullable=True),
sa.Column('created_at', sa.DateTime(timezone=True), nullable=False),
sa.Column('user_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('orders',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('status', sa.String(length=20), nullable=False),
sa.Column('is_payed', sa.Boolean(), nullable=True),
sa.Column('price', sa.Float(), nullable=True),
sa.Column('user_name', sa.String(length=30), nullable=False),
sa.Column('user_id', sa.Integer(), nullable=True),
sa.Column('service_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(timezone=True), nullable=False),
sa.ForeignKeyConstraint(['service_id'], ['services.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('id')
)
# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('orders')
op.drop_table('services')
op.drop_table('favoritos')
op.drop_table('comments')
op.drop_table('users')
# ### end Alembic commands ###
Loading