Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit fcce538

Browse files
committed
updated
1 parent 833b2b4 commit fcce538

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

‎app/models.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
from .database import Base
22
from sqlalchemy import TIMESTAMP, Column, String, Boolean
33
from sqlalchemy.sql import func
4-
from fastapi_utils.guid_type import GUID, GUID_SERVER_DEFAULT_POSTGRESQL
4+
from fastapi_utils.guid_type import GUID, GUID_DEFAULT_SQLITE
55

66

77
class Note(Base):
88
__tablename__ = 'notes'
9-
id = Column(GUID, primary_key=True,
10-
server_default=GUID_SERVER_DEFAULT_POSTGRESQL)
9+
id = Column(GUID, primary_key=True, default=GUID_DEFAULT_SQLITE)
1110
title = Column(String, nullable=False)
1211
content = Column(String, nullable=False)
1312
category = Column(String, nullable=True)
14-
published = Column(Boolean, nullable=False, server_default='True')
13+
published = Column(Boolean, nullable=False, default=True)
1514
createdAt = Column(TIMESTAMP(timezone=True),
1615
nullable=False, server_default=func.now())
1716
updatedAt = Column(TIMESTAMP(timezone=True),

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /