mirror of
https://github.com/solero/houdini.git
synced 2024-11-09 20:58:20 +00:00
Set penguin puffle item default quantity to 1
This commit is contained in:
parent
01dc037afb
commit
4c673ea089
@ -1010,7 +1010,7 @@ DROP TABLE IF EXISTS penguin_puffle_item;
|
||||
CREATE TABLE penguin_puffle_item (
|
||||
penguin_id INT NOT NULL,
|
||||
item_id INT NOT NULL,
|
||||
quantity SMALLINT NOT NULL,
|
||||
quantity SMALLINT NOT NULL DEFAULT 1,
|
||||
PRIMARY KEY (penguin_id, item_id),
|
||||
CONSTRAINT penguin_puffle_item_ibfk_1 FOREIGN KEY (penguin_id) REFERENCES penguin (id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT penguin_puffle_item_ibfk_2 FOREIGN KEY (item_id) REFERENCES puffle_item (id) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
|
@ -96,7 +96,7 @@ class PenguinPuffleItem(db.Model):
|
||||
nullable=False)
|
||||
item_id = db.Column(db.ForeignKey('puffle_item.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True,
|
||||
nullable=False)
|
||||
quantity = db.Column(db.SmallInteger, nullable=False)
|
||||
quantity = db.Column(db.SmallInteger, nullable=False, server_default=db.text("1"))
|
||||
|
||||
|
||||
class PenguinLaunchGame(db.Model):
|
||||
|
Loading…
Reference in New Issue
Block a user