mirror of
https://github.com/solero/houdini.git
synced 2024-11-25 15:07:24 +00:00
Add best_buddy column to character_buddies table
This commit is contained in:
parent
abaa5234d9
commit
c7a2dafae9
@ -735,6 +735,7 @@ DROP TABLE IF EXISTS character_buddy;
|
||||
CREATE TABLE character_buddy (
|
||||
penguin_id INT NOT NULL,
|
||||
character_id SMALLINT NOT NULL,
|
||||
best_buddy BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
PRIMARY KEY (penguin_id, character_id),
|
||||
CONSTRAINT character_buddy_ibfk_1 FOREIGN KEY (penguin_id) REFERENCES penguin (id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT character_buddy_ibfk_2 FOREIGN KEY (character_id) REFERENCES character (id) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
|
@ -41,4 +41,5 @@ class CharacterBuddy(db.Model):
|
||||
penguin_id = db.Column(db.ForeignKey('penguin.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True,
|
||||
nullable=False)
|
||||
character_id = db.Column(db.ForeignKey('character.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True,
|
||||
nullable=False)
|
||||
nullable=False)
|
||||
best_buddy = db.Column(db.Boolean, nullable=False, server_default=db.text("false"))
|
Loading…
Reference in New Issue
Block a user