Skip to content
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

functionality and styles #558

Open
wants to merge 227 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
227 commits
Select commit Hold shift + click to select a range
bb46452
test
santgeek Oct 29, 2024
8c0df7c
Merge pull request #1 from 4GeeksAcademy/devsm
santgeek Oct 29, 2024
7b346f6
build(Database): Created basic database
yjchf Oct 30, 2024
456058c
build - primeros pasos de LandingPage
ezebellino Oct 31, 2024
c25fbfb
cambios a los estilos de los botones y del form
ezebellino Nov 1, 2024
323711f
seguimos haciendo cambios de estilos
ezebellino Nov 1, 2024
d45a471
feat LoginForm
ezebellino Nov 2, 2024
427ae8c
Merge pull request #8 from 4GeeksAcademy/devZeqe
ezebellino Nov 2, 2024
0465eba
Build(Schemas): Construccion de esquemas
yjchf Nov 2, 2024
6e142a1
Merge branch 'dev' into YuneDev
yjchf Nov 2, 2024
952e405
build(adminView): sidebar menu, studente creation form, and admin pag…
santgeek Nov 2, 2024
704df54
Build(teacher register form): form with a function to upload photos
santgeek Nov 3, 2024
fa8740a
build(adminView): minor adjustments to the forms in the admin view
santgeek Nov 3, 2024
071c4d3
Resolved merge conflicts
santgeek Nov 3, 2024
eb4e03a
Merge pull request #9 from 4GeeksAcademy/devsm
santgeek Nov 3, 2024
dafc753
hotfix: instalación de dependencias para corregir error al cargar la …
santgeek Nov 4, 2024
3fd3311
Merge pull request #10 from 4GeeksAcademy/devsm
santgeek Nov 4, 2024
1c9fe2b
build(teacherview): basic layout for the teacher view
santgeek Nov 4, 2024
7d5a06c
cambios en styles
ezebellino Nov 4, 2024
b96f707
Merge branch 'dev' into devZeqe
ezebellino Nov 4, 2024
ac398e6
build(admin_routes) Creacion de rutas para admin
yjchf Nov 5, 2024
e8d09bb
Merge branch 'dev' into YuneDev
yjchf Nov 5, 2024
6ebc1f5
fix(models): eliminacion y reajuste de modelos
yjchf Nov 5, 2024
403f520
Merge pull request #11 from 4GeeksAcademy/YuneDev
yjchf Nov 5, 2024
a7675fa
creando archivos LoginForm.modules.css y demás cambios
ezebellino Nov 5, 2024
51bcd03
Merge branch 'dev' into devZeqe
ezebellino Nov 5, 2024
382b682
fix(styles): minor changes
santgeek Nov 5, 2024
7a35deb
merge branch 'dev' into devsm
santgeek Nov 5, 2024
39f0739
migrations
yjchf Nov 5, 2024
3e123f0
Merge pull request #12 from 4GeeksAcademy/YuneDev
yjchf Nov 5, 2024
b916a13
Merge branch 'dev' into devZeqe
ezebellino Nov 5, 2024
5a227ff
Merge branch 'dev' into devsm
santgeek Nov 5, 2024
75664dc
creando los diversos archivos CSS
ezebellino Nov 6, 2024
0eb08d8
Seguimos con el trabajo de despejar Home.css
ezebellino Nov 6, 2024
9bd8251
cambios a LoginForm y RegistrationForm y sus estilos, resta acomodar …
ezebellino Nov 6, 2024
8c79b9a
build(teacherView): added new vistas and forms to the teacher for gra…
santgeek Nov 7, 2024
9235b0d
Merge pull request #13 from 4GeeksAcademy/devsm
santgeek Nov 7, 2024
97e2657
build(teacher & admin views): added new options and completed the forms
santgeek Nov 7, 2024
4a4394e
Build(CRUD): Endpoints
yjchf Nov 7, 2024
2395a2c
Fix(admin_routes): function overwritting
yjchf Nov 7, 2024
e3e321f
acomodando el botón de menú hamb
ezebellino Nov 9, 2024
d0d3277
Merge pull request #14 from 4GeeksAcademy/devZeqe
ezebellino Nov 9, 2024
7daa4ec
minor changes
santgeek Nov 9, 2024
1cebf30
Traer cambios adicionales
santgeek Nov 9, 2024
54f5e5d
build component CardDocente, CarruselValoraciones y sus estilos
ezebellino Nov 11, 2024
e7caaef
refactor(Admin_routes): Create new logic to handle CRUD operations
yjchf Nov 14, 2024
8840eec
Merge branch 'dev' into YuneDev
yjchf Nov 14, 2024
08effe3
style: changin design views
santgeek Nov 14, 2024
35f819c
Merge pull request #29 from 4GeeksAcademy/YuneDev
yjchf Nov 14, 2024
8f8f4dd
Bring latest changes from dev
santgeek Nov 14, 2024
b1042fe
hotfix(forms): corrections to access forms inputs and elements
santgeek Nov 15, 2024
f660050
Merge pull request #30 from 4GeeksAcademy/devsm
santgeek Nov 15, 2024
90b7c15
acomodando estilos en los form
ezebellino Nov 15, 2024
c4c724b
cambios traidos del merge
ezebellino Nov 15, 2024
6ab51e6
fast commit
yjchf Nov 16, 2024
3de6d96
pipfile modified
yjchf Nov 16, 2024
85df9b6
realizando actualizaciones del sprint 2
ezebellino Nov 17, 2024
ba5dc2d
build(teacher_endpoints): Agregado calificaciones,evaluacions persona…
yjchf Nov 19, 2024
7410f45
Merge branch 'dev' into YuneDev
yjchf Nov 19, 2024
09d0069
Merge pull request #31 from 4GeeksAcademy/YuneDev
yjchf Nov 19, 2024
6f85908
feat(flux logic): logic to post grados data
santgeek Nov 19, 2024
d4ede60
Feat(flux and admin logic): get and send data.
santgeek Nov 20, 2024
6af83a2
feat - creación de ProtectedRoutes y refactor estilos y componentes c…
ezebellino Nov 20, 2024
ab4355d
solucionando los conflictos
ezebellino Nov 20, 2024
55e2d23
Fix(Requests): Fixed 422 error
yjchf Nov 21, 2024
75927b7
Merge pull request #32 from 4GeeksAcademy/YuneDev
yjchf Nov 21, 2024
4cae0e2
Merge branch 'dev' into devZeqe
ezebellino Nov 21, 2024
df0ca44
style(responsive forms): small adjustments to make the forms responsive
santgeek Nov 21, 2024
e33234a
Merge branch 'dev' into devsm
santgeek Nov 21, 2024
9b50e3e
feat(api grados): functionalities to post courses and to get the info…
santgeek Nov 21, 2024
e02c96d
fix styles form fixeds
ezebellino Nov 21, 2024
eff8788
Build(Flux): create crudOperation func and subjects crudHandler
yjchf Nov 22, 2024
e63abde
feat(CRUD users): CRUD para postear y borrar usuarios autorizadosen flux
santgeek Nov 22, 2024
3ad3261
feat(flux): modified try/catch blocks to manage errors
yjchf Nov 22, 2024
c88efdd
Merge pull request #33 from 4GeeksAcademy/YuneDev
yjchf Nov 22, 2024
a4d794b
feature cambios en forms y agregado de funcionalidades
ezebellino Nov 23, 2024
ea073f8
Merge branch 'dev' into devZeqe
ezebellino Nov 23, 2024
ff24c21
feature, borrado de espacios
ezebellino Nov 23, 2024
21cc25a
feature borrado de espacios en layout.js
ezebellino Nov 23, 2024
67e4870
features borrado de comments
ezebellino Nov 23, 2024
dbb4407
minor changes
santgeek Nov 24, 2024
fee91e6
Merge branch 'dev' into devsm
santgeek Nov 24, 2024
9f262ee
Merge pull request #34 from 4GeeksAcademy/devsm
santgeek Nov 24, 2024
9116cb4
borrado de espacios innecesarios
ezebellino Nov 24, 2024
f84d1b1
acomodando ubicacion del logo
ezebellino Nov 24, 2024
9a34bd1
cambios post conflictos merge
ezebellino Nov 24, 2024
6e68215
Merge pull request #35 from 4GeeksAcademy/devZeqe
ezebellino Nov 24, 2024
de069bb
Build(ParentDashboard): Create basic parent dashboard
yjchf Nov 24, 2024
d3031c9
Merge branch 'dev' into YuneDev
yjchf Nov 24, 2024
cccb191
Merge pull request #36 from 4GeeksAcademy/YuneDev
yjchf Nov 24, 2024
7f5fc8d
Flux example code
santgeek Nov 24, 2024
fe02151
Merge branch 'dev' into devsm
santgeek Nov 24, 2024
ba709dd
Fix(appContext/flux): Bug setting store
yjchf Nov 25, 2024
c718e0a
Merge pull request #37 from 4GeeksAcademy/YuneDev
yjchf Nov 25, 2024
f5163ee
Merge branch 'dev' into devsm
santgeek Nov 26, 2024
157da10
actualización de npm install y arreglo de className en leftMenuAdmin
ezebellino Nov 26, 2024
ed7b533
Merge branch 'dev' into devZeqe
ezebellino Nov 26, 2024
2093608
Refactor(ProtectedRoute): Mejora de logica para vistas protegidas e i…
yjchf Nov 26, 2024
db9cee3
Merge pull request #47 from 4GeeksAcademy/YuneDev
yjchf Nov 26, 2024
2af5230
build - creando componente chatComponent
ezebellino Nov 26, 2024
18dd79c
Merge branch 'dev' into devZeqe con solucion de permanencia de sessio…
ezebellino Nov 26, 2024
a3bbf8f
Merge branch 'dev' into devsm
santgeek Nov 27, 2024
432dd2b
Build(endpoint): "Creacion de enpoint para traer asignaciones de doce…
yjchf Nov 28, 2024
dad67d7
Merge pull request #48 from 4GeeksAcademy/YuneDev
yjchf Nov 28, 2024
2d0a5a0
feat(assign subject): functionality for assignin subjects to teachers
santgeek Nov 28, 2024
85123c0
Merge branch 'dev' into devsm
santgeek Nov 28, 2024
4ae05c9
feat(grados): funcionalidad para crear grados, añadir materias y asig…
santgeek Nov 28, 2024
43a57fc
build chatComponent - refactor navbar para aparición del logout
ezebellino Nov 28, 2024
60703f7
style(minor adjustmens): design adjustmenes for the teacher vview
santgeek Nov 28, 2024
68864a4
Merge branch 'main' into devZeqe
ezebellino Nov 29, 2024
888cadd
cambios del navbar y estilos del ChatComponent
ezebellino Nov 29, 2024
e3bf94a
Build routes, functions for parent dashboard and contacts
yjchf Nov 30, 2024
c6706d0
Merge branch 'dev' into YuneDev
yjchf Nov 30, 2024
7abc2e4
Merge pull request #50 from 4GeeksAcademy/YuneDev
yjchf Nov 30, 2024
0923a79
Modified gitignore
yjchf Nov 30, 2024
4a0c812
Merge pull request #51 from 4GeeksAcademy/migrations
yjchf Nov 30, 2024
d18da45
Merge pull request #52 from 4GeeksAcademy/dev
yjchf Nov 30, 2024
f1cf822
Modified Render.yaml
yjchf Nov 30, 2024
21bed30
build: logic for posting students and evalutaions
santgeek Nov 30, 2024
d4b2513
Merge branch 'dev' into devsm
santgeek Nov 30, 2024
ae4a329
Merge branch 'dev' into YuneDev
yjchf Nov 30, 2024
0f748c5
latest updates from dev
santgeek Nov 30, 2024
c3bbbd9
Merge pull request #53 from 4GeeksAcademy/devsm
santgeek Nov 30, 2024
e4cba32
Fix(Flux): Fetch baseURL
yjchf Nov 30, 2024
884476e
Merge pull request #54 from 4GeeksAcademy/YuneDev
yjchf Nov 30, 2024
7eaab13
Merge pull request #55 from 4GeeksAcademy/dev
yjchf Nov 30, 2024
2323a9f
build Dashboard y ChatComponent
ezebellino Dec 2, 2024
799c5e7
resolución de conflictos del merge
ezebellino Dec 2, 2024
4a9b94c
changes in LoginForm y Navbar para la funcionalidad de Mensajería
ezebellino Dec 3, 2024
001d096
Fix(Admin_route): Filter Condition and data restructured
yjchf Dec 3, 2024
d9bae9c
Merge remote-tracking branch 'refs/remotes/origin/devZeqe' into devZeqe
ezebellino Dec 3, 2024
46f4040
Merge branch 'dev' into YuneDev
yjchf Dec 3, 2024
b0eefbf
Merge dev
yjchf Dec 3, 2024
d821af9
Merge pull request #56 from 4GeeksAcademy/YuneDev
yjchf Dec 3, 2024
b8b2127
se quita el replace del flux
ezebellino Dec 3, 2024
ee725e1
fix problems
ezebellino Dec 3, 2024
b99d050
feat(student form): functionality for creating students
santgeek Dec 3, 2024
6ebd1c0
feat(evaluations form): creación de evaluaciones con selección de gra…
santgeek Dec 3, 2024
7b0d25c
feat navbar, Loginform
ezebellino Dec 5, 2024
9c7546f
agregando rounded-pill
ezebellino Dec 5, 2024
a9d86db
Merge pull request #57 from 4GeeksAcademy/devZeqe
ezebellino Dec 5, 2024
de4d4e2
Build(forms): ProfileForm, PasswordRecovery and flux logic
yjchf Dec 5, 2024
e4a52b0
Changes from devZeque Branch
yjchf Dec 5, 2024
5d6431d
Merge pull request #58 from 4GeeksAcademy/YuneDev
yjchf Dec 5, 2024
c1dc80f
fix problems in NavBar and LoginForm
ezebellino Dec 5, 2024
8237bc5
Merge branch 'dev' into devZeqe
ezebellino Dec 5, 2024
4a42b46
feat(authorize users): functionality for authorizing users
santgeek Dec 5, 2024
c1b786a
Merge branch 'dev' into devsm
santgeek Dec 5, 2024
449a8e7
cambios realizados en el RegistrationForm, se agrega el ModalMessage
ezebellino Dec 5, 2024
e580e29
Merge pull request #59 from 4GeeksAcademy/devsm
santgeek Dec 5, 2024
5085ea4
feat background LoginForm
ezebellino Dec 5, 2024
23a4b68
fix bug in Registration form
ezebellino Dec 5, 2024
d2503f1
Merge pull request #60 from 4GeeksAcademy/devZeqe
ezebellino Dec 5, 2024
a3cab59
feat(scores): functionality for creating the scores for each student …
santgeek Dec 6, 2024
ff6a82b
Styles correction
yjchf Dec 7, 2024
bace112
Merge branch 'dev' into YuneDev
yjchf Dec 7, 2024
3c292f1
Merge pull request #62 from 4GeeksAcademy/YuneDev
yjchf Dec 7, 2024
1711d79
build (edit grades): edit grades section plus minor adjustmens styles
santgeek Dec 7, 2024
84730b4
Merge branch 'dev' into devsm
santgeek Dec 7, 2024
1ea8585
Merge pull request #63 from 4GeeksAcademy/devsm
santgeek Dec 7, 2024
76ed9fc
build funcionamiento de mensajería y notificaciones
ezebellino Dec 10, 2024
e5d2854
feat(edit): functionality for updating and deleting student scores
santgeek Dec 11, 2024
00a1889
Merge pull request #67 from 4GeeksAcademy/devsm
santgeek Dec 11, 2024
3c3286e
styles(login): added background image and restyle layout for the logg…
santgeek Dec 12, 2024
2ad681e
Merge pull request #68 from 4GeeksAcademy/devsm
santgeek Dec 12, 2024
a34c95d
Merge pull request #69 from 4GeeksAcademy/devsm
santgeek Dec 12, 2024
4afd39e
Build(PasswordRecovery): Create Password Recovery System
yjchf Dec 13, 2024
5059326
Merge pull request #70 from 4GeeksAcademy/devsm
santgeek Dec 13, 2024
afddbfa
Refactor(GetMessages): Introduce sender rol and name
yjchf Dec 14, 2024
d58cac9
Merge pull request #71 from 4GeeksAcademy/YuneDev
yjchf Dec 14, 2024
97c93bf
cambios en la randerización del chatcomponent
ezebellino Dec 14, 2024
081c39c
cambios post merge
ezebellino Dec 14, 2024
214a678
feat chatComponent remitente msg
ezebellino Dec 14, 2024
42add94
Merge pull request #72 from 4GeeksAcademy/devZeqe
ezebellino Dec 14, 2024
7352c26
Refactor(ParentDashboard): Modify parent review section
yjchf Dec 15, 2024
8708cfe
Merge branch 'dev' into YuneDev
yjchf Dec 15, 2024
00202e2
Build(Flux/Dashboards): ProfileForm rendering for each role
yjchf Dec 15, 2024
61db7c8
feat(edit students): update student data from the frontend
santgeek Dec 16, 2024
d499d6a
feat(update teachers): functionality for updating teacher data
santgeek Dec 16, 2024
5fd44b0
Merge branch 'dev' into devsm
santgeek Dec 16, 2024
e59f2d9
Merge pull request #73 from 4GeeksAcademy/devsm
santgeek Dec 16, 2024
cae7a94
cambios al background de RegistrationForm, retoques en el ChatCompone…
ezebellino Dec 16, 2024
3584a7c
cambios en el LoginForm de estilos del logo y fondo dinámico
ezebellino Dec 17, 2024
521dab7
Merge branch 'dev' into devZeqe
ezebellino Dec 17, 2024
7752ee5
Feature(Flux): Default redirect Logout
yjchf Dec 17, 2024
db83aad
Merge pull request #74 from 4GeeksAcademy/devZeqe
ezebellino Dec 17, 2024
5af8290
styles(home background): minor adjustments to background image
Dec 17, 2024
4321cc9
Merge pull request #75 from 4GeeksAcademy/devsm
santgeek Dec 17, 2024
bae64f8
Merge branch 'dev' into YuneDev
yjchf Dec 17, 2024
e66b0ab
Merge pull request #76 from 4GeeksAcademy/YuneDev
yjchf Dec 17, 2024
97e236f
Merge branch 'dev' into devZeqe
ezebellino Dec 17, 2024
10506d9
styles: frontend admin view adjustments
Dec 18, 2024
bb0af40
Merge pull request #77 from 4GeeksAcademy/devsm
santgeek Dec 18, 2024
85ceae9
Fix(Students): Fix error 400 POST students
yjchf Dec 18, 2024
69c7c9a
Refactor on POST Studetns endpoint to avoid HTTP Error 400
yjchf Dec 18, 2024
19f67b1
styles(admin view): layout adjustments to the admin view windows
Dec 18, 2024
1c003ba
Merge branch 'dev' into devsm
Dec 18, 2024
f7043fb
Merge pull request #79 from 4GeeksAcademy/devsm
santgeek Dec 18, 2024
cba9865
cambios realizados y ajustes a los componentes chatComponent, LeftMen…
ezebellino Dec 19, 2024
a4fa148
cambios en el component.css
ezebellino Dec 19, 2024
a77dda5
Merge branch 'dev' into devZeqe
ezebellino Dec 19, 2024
a4adeca
estilos de dashboardTeacher
ezebellino Dec 19, 2024
8e70970
Merge pull request #80 from 4GeeksAcademy/devZeqe
ezebellino Dec 19, 2024
7bab8f6
Feat(Favicon): Change FavIcon
yjchf Dec 19, 2024
e98c759
Feature(Styles): Re-structured components from parent view
yjchf Dec 19, 2024
b6336cd
style adjustments
Dec 19, 2024
2462d54
Merge branch 'dev' into devsm
Dec 19, 2024
a3727ff
Feature: Fixing components styles
yjchf Dec 19, 2024
c8b34f2
feat(update Tests): functionality for updating tests from the frontend
Dec 19, 2024
557ec58
Merge pull request #81 from 4GeeksAcademy/devsm
santgeek Dec 19, 2024
0843655
Merge branch 'dev' into YuneDev
yjchf Dec 19, 2024
a3f3c10
Merge pull request #82 from 4GeeksAcademy/YuneDev
yjchf Dec 19, 2024
36a8d40
Merge pull request #83 from 4GeeksAcademy/main
yjchf Dec 19, 2024
ac76a98
fix(update Scores and tests): adjustments for reseting content in the…
Dec 20, 2024
f9f5882
Merge pull request #84 from 4GeeksAcademy/devsm
santgeek Dec 20, 2024
86709e3
Fix(ProfileForm): Error when saving data
yjchf Dec 20, 2024
685243c
Merge branch 'dev' into YuneDev
yjchf Dec 20, 2024
e3da0cf
Merge pull request #85 from 4GeeksAcademy/YuneDev
yjchf Dec 20, 2024
8d86ece
style:minor changes to the content in the teacher view
Dec 20, 2024
9112f5f
Merge pull request #87 from 4GeeksAcademy/devsm
santgeek Dec 20, 2024
019afc9
update display content
Dec 20, 2024
5f5bb0f
Merge pull request #88 from 4GeeksAcademy/devsm
santgeek Dec 20, 2024
08eae69
Hotfix: styles correction
yjchf Dec 20, 2024
82587c3
Merge branch 'dev' into YuneDev
yjchf Dec 20, 2024
d6f6d6c
Merge pull request #90 from 4GeeksAcademy/YuneDev
yjchf Dec 20, 2024
4370ea9
styles: password recovery background design
Dec 20, 2024
3d228e9
Merge branch 'dev' into devsm
Dec 20, 2024
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,5 @@ database.database
database.db
diagram.png
__pycache__/
firebase_key.json

17 changes: 17 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,22 @@
"editor.defaultFormatter": "esbenp.prettier-vscode",
"workbench.editorAssociations": {
"*.md": "vscode.markdown.preview.editor"
},
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"

},
"[css]": {
"editor.defaultFormatter": "vscode.css-language-features"

},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"[javascriptreact]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
}
}
Binary file removed 4geeks.ico
Binary file not shown.
6 changes: 5 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ gunicorn = "*"
cloudinary = "*"
flask-admin = "*"
typing-extensions = "*"
flask-jwt-extended = "==4.6.0"
flask-jwt-extended = "*"
flask-bcrypt = "*"
wtforms = "==3.1.2"
requests = "==2.32.3"
marshmallow = "==3.23.1"
marshmallow-sqlalchemy = "==1.1.0"

[requires]
python_version = "3.10"
Expand Down
820 changes: 530 additions & 290 deletions Pipfile.lock

Large diffs are not rendered by default.

Binary file added ProjectICon.ico
Binary file not shown.
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"}
147 changes: 147 additions & 0 deletions migrations/versions/15366cce7eb8_.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
"""empty message

Revision ID: 15366cce7eb8
Revises:
Create Date: 2024-11-30 01:04:26.944026

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('blocked_token_list',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('jti', sa.String(length=500), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_table('grado',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('nombre', sa.String(length=40), nullable=False),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('nombre')
)
op.create_table('role',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('nombre', sa.String(length=20), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_table('Email_Autorizado',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('email', sa.String(length=50), nullable=False),
sa.Column('isRegistered', sa.Boolean(), nullable=False),
sa.Column('role_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['role_id'], ['role.id'], ),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('email')
)
op.create_table('materia',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('nombre', sa.String(length=50), nullable=False),
sa.Column('descripcion', sa.String(length=70), nullable=True),
sa.Column('grado_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['grado_id'], ['grado.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('user',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('email', sa.String(length=120), nullable=False),
sa.Column('nombre', sa.String(length=50), nullable=False),
sa.Column('apellido', sa.String(length=50), nullable=False),
sa.Column('direccion', sa.String(length=200), nullable=False),
sa.Column('telefono', sa.String(length=50), nullable=True),
sa.Column('password', sa.String(length=500), nullable=False),
sa.Column('is_active', sa.Boolean(), nullable=False),
sa.Column('role_id', sa.Integer(), nullable=False),
sa.Column('foto', sa.String(length=250), nullable=True),
sa.ForeignKeyConstraint(['role_id'], ['role.id'], ),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('email')
)
op.create_table('docente',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('descripcion', sa.String(length=300), nullable=False),
sa.ForeignKeyConstraint(['id'], ['user.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('estudiante',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('nombre', sa.String(length=50), nullable=False),
sa.Column('apellido', sa.String(length=50), nullable=False),
sa.Column('fecha_nacimiento', sa.Date(), nullable=False),
sa.Column('fecha_ingreso', sa.Date(), nullable=False),
sa.Column('is_active', sa.Boolean(), nullable=False),
sa.Column('representante_id', sa.Integer(), nullable=False),
sa.Column('grado_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['grado_id'], ['grado.id'], ),
sa.ForeignKeyConstraint(['representante_id'], ['user.id'], ),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('nombre', 'apellido', 'representante_id', name='estudiante_representante_unique')
)
op.create_table('messages',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('sender_id', sa.Integer(), nullable=False),
sa.Column('receiver_id', sa.Integer(), nullable=False),
sa.Column('subject', sa.String(length=50), nullable=False),
sa.Column('content', sa.String(length=500), nullable=False),
sa.Column('read', sa.Boolean(), nullable=True),
sa.ForeignKeyConstraint(['receiver_id'], ['user.id'], ),
sa.ForeignKeyConstraint(['sender_id'], ['user.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('docente_materias',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('id_docente', sa.Integer(), nullable=True),
sa.Column('id_materia', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['id_docente'], ['docente.id'], ),
sa.ForeignKeyConstraint(['id_materia'], ['materia.id'], ),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('id_docente', 'id_materia', name='docente_materia_unique')
)
op.create_table('evaluacion',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('profesor_id', sa.Integer(), nullable=False),
sa.Column('materia_id', sa.Integer(), nullable=False),
sa.Column('nombre', sa.String(length=50), nullable=False),
sa.Column('descripcion', sa.String(length=100), nullable=True),
sa.Column('fecha', sa.Date(), nullable=True),
sa.Column('finalizada', sa.Boolean(), nullable=False),
sa.ForeignKeyConstraint(['materia_id'], ['materia.id'], ),
sa.ForeignKeyConstraint(['profesor_id'], ['docente.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('calificacion',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('evaluacion_id', sa.Integer(), nullable=True),
sa.Column('estudiante_id', sa.Integer(), nullable=True),
sa.Column('nota', sa.Float(), nullable=False),
sa.ForeignKeyConstraint(['estudiante_id'], ['estudiante.id'], ),
sa.ForeignKeyConstraint(['evaluacion_id'], ['evaluacion.id'], ),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('calificacion')
op.drop_table('evaluacion')
op.drop_table('docente_materias')
op.drop_table('messages')
op.drop_table('estudiante')
op.drop_table('docente')
op.drop_table('user')
op.drop_table('materia')
op.drop_table('Email_Autorizado')
op.drop_table('role')
op.drop_table('grado')
op.drop_table('blocked_token_list')
# ### end Alembic commands ###
Loading