Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 5a1a5bf

Browse files
authored
Merge branch 'main' into arm-support
2 parents 0e889ac + 1aacaea commit 5a1a5bf

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

alembic/env.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@
6464
auth_membership
6565
auth_permission
6666
auth_user
67+
book_author
68+
page_views
69+
user_activity
6770
chapters
6871
clickablearea_answers
6972
code
@@ -192,6 +195,7 @@ def run_migrations_offline():
192195
url=url,
193196
target_metadata=target_metadata,
194197
literal_binds=True,
198+
compare_type=True,
195199
dialect_opts={"paramstyle": "named"},
196200
include_name=include_name,
197201
)
@@ -211,6 +215,7 @@ def run_migrations_online():
211215
with connectable.connect() as connection:
212216
context.configure(
213217
connection=connection,
218+
compare_type=True,
214219
target_metadata=target_metadata,
215220
include_name=include_name,
216221
)

bookserver/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ class QuestionGrade(Base, IdMixin):
547547
div_id = Column(String(512), nullable=False, index=True)
548548
# Manually-graded questions may be unscored (a NULL score).
549549
score = Column(Float(53))
550-
comment = Column(Text, nullable=False)
550+
comment = Column(Text, nullable=True)
551551
deadline = Column(DateTime)
552552
# Grades before the improved autograded and manually-scored grades lack this. Since it can refer to an ID from many different tables, don't make it a constraint.
553553
answer_id = Column(Integer)
@@ -749,7 +749,7 @@ class Library(Base, IdMixin):
749749
authors = Column(Text)
750750
shelf_section = Column(String(512))
751751
basecourse = Column(
752-
String(512), ForeignKey("courses.course_name"), nullable=True, unique=True
752+
String(512), ForeignKey("courses.course_name"), nullable=False, unique=True
753753
)
754754
build_system = Column(String(20))
755755
for_classes = Column(Web2PyBoolean)

0 commit comments

Comments
 (0)