mirror of
https://github.com/solero/houdini.git
synced 2024-11-10 05:08:19 +00:00
Removal of unnecessary columns that aren't utilized in the warning table
This commit is contained in:
parent
82eacb42e7
commit
e62b4f6bd7
@ -690,11 +690,8 @@ COMMENT ON COLUMN ban.comment IS 'Ban comment';
|
||||
DROP TABLE IF EXISTS warning;
|
||||
CREATE TABLE warning (
|
||||
penguin_id INT NOT NULL,
|
||||
issued TIMESTAMP NOT NULL,
|
||||
expires TIMESTAMP NOT NULL,
|
||||
type SMALLINT NOT NULL,
|
||||
comment TEXT NOT NULL,
|
||||
PRIMARY KEY (penguin_id, issued, expires),
|
||||
PRIMARY KEY (penguin_id, expires),
|
||||
CONSTRAINT warning_ibfk_1 FOREIGN KEY (penguin_id) REFERENCES penguin (id) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
);
|
||||
|
||||
|
@ -18,10 +18,8 @@ class Warning(db.Model):
|
||||
|
||||
penguin_id = db.Column(db.ForeignKey('penguin.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True,
|
||||
nullable=False)
|
||||
issued = db.Column(db.DateTime, primary_key=True, nullable=False)
|
||||
expires = db.Column(db.DateTime, primary_key=True, nullable=False)
|
||||
type = db.Column(db.SmallInteger, nullable=False)
|
||||
comment = db.Column(db.Text, nullable=False)
|
||||
|
||||
|
||||
|
||||
class Report(db.Model):
|
||||
|
Loading…
Reference in New Issue
Block a user