-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #142 from SELab-2/dev
Release 2
- Loading branch information
Showing
187 changed files
with
13,534 additions
and
5,661 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FRONTEND_URL="https://localhost:8080" | ||
CAS_SERVER_URL="https://login.ugent.be" | ||
DATABASE_URI="postgresql://username:password@url:port/db-name" | ||
SECRET_KEY="test" # e.g. generate with `openssl rand -hex 32` | ||
ALGORITHM="HS256" # algorithm used to sign JWT tokens | ||
FILE_PATH="files" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ __pycache__ | |
config.yml | ||
.env | ||
.coverage | ||
files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Generic single-database configuration. | ||
Generic single-database configuration. |
37 changes: 37 additions & 0 deletions
37
backend/alembic/versions/20886268d8b4_add_instructor_project_table.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
"""Add instructor project table | ||
Revision ID: 20886268d8b4 | ||
Revises: fe818acfa209 | ||
Create Date: 2024-04-04 22:20:35.996274 | ||
""" | ||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = '20886268d8b4' | ||
down_revision: Union[str, None] = 'fe818acfa209' | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table('instructor_project', | ||
sa.Column('uid', sa.String(), nullable=True), | ||
sa.Column('project_id', sa.Integer(), nullable=True), | ||
sa.ForeignKeyConstraint( | ||
['project_id'], ['project.id'], ondelete='CASCADE'), | ||
sa.ForeignKeyConstraint( | ||
['uid'], ['website_user.uid'], ondelete='CASCADE') | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_table('instructor_project') | ||
# ### end Alembic commands ### |
56 changes: 56 additions & 0 deletions
56
backend/alembic/versions/5011e8183104_add_uuid_files_and_requirements_for_.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
"""add uuid files and requirements for project | ||
Revision ID: 5011e8183104 | ||
Revises: 76859289ea2d | ||
Create Date: 2024-03-27 21:50:17.418154 | ||
""" | ||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = '5011e8183104' | ||
down_revision: Union[str, None] = '76859289ea2d' | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table('requirement', | ||
sa.Column('id', sa.Integer(), nullable=False), | ||
sa.Column('project_id', sa.Integer(), nullable=True), | ||
sa.Column('mandatory', sa.Boolean(), nullable=False), | ||
sa.Column('value', sa.String(), nullable=False), | ||
sa.ForeignKeyConstraint( | ||
['project_id'], ['project.id'], ondelete='CASCADE'), | ||
sa.PrimaryKeyConstraint('id') | ||
) | ||
op.add_column('submission', sa.Column('files_uuid', sa.String(), nullable=False)) | ||
op.drop_constraint('teacher_subject_uid_fkey', | ||
'teacher_subject', type_='foreignkey') | ||
op.drop_constraint('teacher_subject_subject_id_fkey', | ||
'teacher_subject', type_='foreignkey') | ||
op.create_foreign_key('teacher_subject_subject_id_fkey', 'teacher_subject', 'subject', [ | ||
'subject_id'], ['id'], ondelete='CASCADE') | ||
op.create_foreign_key('teacher_subject_website_user_fkey', 'teacher_subject', 'website_user', | ||
['uid'], ['uid'], ondelete='CASCADE') | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_constraint('teacher_subject_subject_id_fkey', | ||
'teacher_subject', type_='foreignkey') | ||
op.drop_constraint('teacher_subject_website_user_fkey', | ||
'teacher_subject', type_='foreignkey') | ||
op.create_foreign_key('teacher_subject_subject_id_fkey', | ||
'teacher_subject', 'subject', ['subject_id'], ['id']) | ||
op.create_foreign_key('teacher_subject_uid_fkey', | ||
'teacher_subject', 'website_user', ['uid'], ['uid']) | ||
op.drop_column('submission', 'files_uuid') | ||
op.drop_table('requirement') | ||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
"""update message | ||
Revision ID: 5df13f3f88cc | ||
Revises: ec4231ba1311 | ||
Create Date: 2024-04-05 17:11:51.091498 | ||
""" | ||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = '5df13f3f88cc' | ||
down_revision: Union[str, None] = 'ec4231ba1311' | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column('project', 'is_visible', | ||
existing_type=sa.BOOLEAN(), | ||
nullable=False) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column('project', 'is_visible', | ||
existing_type=sa.BOOLEAN(), | ||
nullable=True) | ||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
backend/alembic/versions/a88aec136b59_is_teacher_boolean_and_instructor.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
"""is_teacher_boolean_and_instructor | ||
Revision ID: a88aec136b59 | ||
Revises: 5011e8183104 | ||
Create Date: 2024-04-03 21:47:10.758518 | ||
""" | ||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = 'a88aec136b59' | ||
down_revision: Union[str, None] = '5011e8183104' | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table('instructor_subject', | ||
sa.Column('uid', sa.String(), nullable=True), | ||
sa.Column('subject_id', sa.Integer(), nullable=True), | ||
sa.ForeignKeyConstraint( | ||
['subject_id'], ['subject.id'], ondelete='CASCADE'), | ||
sa.ForeignKeyConstraint( | ||
['uid'], ['website_user.uid'], ondelete='CASCADE') | ||
) | ||
op.drop_table('teacher_subject') | ||
op.add_column('website_user', sa.Column('is_teacher', sa.Boolean(), | ||
nullable=False, server_default=sa.false())) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_column('website_user', 'is_teacher') | ||
op.create_table('teacher_subject', | ||
sa.Column('uid', sa.VARCHAR(), autoincrement=False, nullable=True), | ||
sa.Column('subject_id', sa.INTEGER(), | ||
autoincrement=False, nullable=True), | ||
sa.ForeignKeyConstraint(['subject_id'], ['subject.id'], | ||
name='teacher_subject_subject_id_fkey', ondelete='CASCADE'), | ||
sa.ForeignKeyConstraint(['uid'], ['website_user.uid'], | ||
name='teacher_subject_website_user_fkey', ondelete='CASCADE') | ||
) | ||
op.drop_table('instructor_subject') | ||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
"""add_capacity | ||
Revision ID: aa8ad1b4f8dc | ||
Revises: 5df13f3f88cc | ||
Create Date: 2024-04-05 21:54:32.401866 | ||
""" | ||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = 'aa8ad1b4f8dc' | ||
down_revision: Union[str, None] = '5df13f3f88cc' | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column('project', sa.Column('capacity', sa.Integer(), nullable=False)) | ||
op.drop_constraint('student_group_team_id_fkey', | ||
'student_group', type_='foreignkey') | ||
op.drop_constraint('student_group_uid_fkey', 'student_group', type_='foreignkey') | ||
op.create_foreign_key('student_group_team_id_fkey', 'student_group', 'team', [ | ||
'team_id'], ['id'], ondelete='CASCADE') | ||
op.create_foreign_key('student_group_uid_fkey', 'student_group', 'website_user', | ||
['uid'], ['uid'], ondelete='CASCADE') | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_constraint('student_group_team_id_fkey', | ||
'student_group', type_='foreignkey') | ||
op.drop_constraint('student_group_uid_fkey', 'student_group', type_='foreignkey') | ||
op.create_foreign_key('student_group_uid_fkey', 'student_group', | ||
'website_user', ['uid'], ['uid']) | ||
op.create_foreign_key('student_group_team_id_fkey', | ||
'student_group', 'team', ['team_id'], ['id']) | ||
op.drop_column('project', 'capacity') | ||
# ### end Alembic commands ### |
Oops, something went wrong.