Modified files
storeapi/database.py
---
+++
@@ -28,7 +28,15 @@
sqlalchemy.Column("id", sqlalchemy.Integer, primary_key=True),
sqlalchemy.Column("body", sqlalchemy.String),
sqlalchemy.Column("post_id", sqlalchemy.ForeignKey("posts.id"), nullable=False),
- sqlalchemy.Column("user_id", sqlalchemy.ForeignKey("users.id"), nullable=False),
+ sqlalchemy.Column("user_id", sqlalchemy.ForeignKey("users.id"), nullable=False)
+)
+
+like_table = sqlalchemy.Table(
+ "likes",
+ metadata,
+ sqlalchemy.Column("id", sqlalchemy.Integer, primary_key=True),
+ sqlalchemy.Column("post_id", sqlalchemy.ForeignKey("posts.id"), nullable=False),
+ sqlalchemy.Column("user_id", sqlalchemy.ForeignKey("users.id"), nullable=False)
)
engine = sqlalchemy.create_engine(