Skip to content

Commit 52492de

Browse files
committed
Renamed db column to make lint happy
1 parent 8fa3f15 commit 52492de

File tree

4 files changed

+34
-6
lines changed

4 files changed

+34
-6
lines changed

conditional/blueprints/dashboard.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def display_dashboard(user_dict=None):
8989
MajorProject.uid,
9090
MajorProject.name,
9191
MajorProject.tldr,
92-
MajorProject.timeSpent,
92+
MajorProject.time_spent,
9393
MajorProject.description,
9494
MajorProject.links,
9595
MajorProject.status,
@@ -107,7 +107,7 @@ def display_dashboard(user_dict=None):
107107
"name": p.name,
108108
"proj_name": p.name,
109109
"tldr": p.tldr,
110-
"time_spent": p.timeSpent,
110+
"time_spent": p.time_spent,
111111
"skills": p.skills,
112112
"desc": p.description,
113113
"links": list(filter(None, p.links.split("\n"))),

conditional/blueprints/major_project_submission.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def display_major_project(user_dict=None):
6565
MajorProject.uid,
6666
MajorProject.name,
6767
MajorProject.tldr,
68-
MajorProject.timeSpent,
68+
MajorProject.time_spent,
6969
MajorProject.description,
7070
MajorProject.links,
7171
MajorProject.status,
@@ -86,7 +86,7 @@ def display_major_project(user_dict=None):
8686
"name": ldap_get_member(p.uid).cn,
8787
"proj_name": p.name,
8888
"tldr": p.tldr,
89-
"time_spent": p.timeSpent,
89+
"time_spent": p.time_spent,
9090
"skills": p.skills,
9191
"desc": p.description,
9292
"links": list(filter(None, p.links.split("\n"))),

conditional/models/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class MajorProject(db.Model):
134134
uid = Column(String(32), nullable=False, index=True)
135135
name = Column(String(64), nullable=False)
136136
tldr = Column(String(128), nullable=True)
137-
timeSpent = Column(Text, nullable=True)
137+
time_spent = Column(Text, nullable=True)
138138
description = Column(Text, nullable=False)
139139
links = Column(Text, nullable=True)
140140
active = Column(Boolean, nullable=False)
@@ -147,7 +147,7 @@ def __init__(self, uid, name, tldr, time_spent, description, links): # pylint: d
147147
self.date = datetime.now()
148148
self.name = name
149149
self.tldr = tldr
150-
self.timeSpent = time_spent
150+
self.time_spent = time_spent
151151
self.description = description
152152
self.links = links
153153
self.status = 'Pending'
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
"""empty message
2+
3+
Revision ID: 95538b39976f
4+
Revises: 6c4cf35d7c0c
5+
Create Date: 2026-03-09 15:20:23.072283
6+
7+
"""
8+
9+
# revision identifiers, used by Alembic.
10+
revision = '95538b39976f'
11+
down_revision = '6c4cf35d7c0c'
12+
13+
from alembic import op
14+
import sqlalchemy as sa
15+
16+
17+
def upgrade():
18+
# ### commands auto generated by Alembic - please adjust! ###
19+
op.add_column('major_projects', sa.Column('time_spent', sa.Text(), nullable=True))
20+
op.drop_column('major_projects', 'timeSpent')
21+
# ### end Alembic commands ###
22+
23+
24+
def downgrade():
25+
# ### commands auto generated by Alembic - please adjust! ###
26+
op.add_column('major_projects', sa.Column('timeSpent', sa.TEXT(), autoincrement=False, nullable=True))
27+
op.drop_column('major_projects', 'time_spent')
28+
# ### end Alembic commands ###

0 commit comments

Comments
 (0)