mirror of
https://github.com/solero/houdini.git
synced 2025-01-11 15:17:00 +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;
|
DROP TABLE IF EXISTS warning;
|
||||||
CREATE TABLE warning (
|
CREATE TABLE warning (
|
||||||
penguin_id INT NOT NULL,
|
penguin_id INT NOT NULL,
|
||||||
issued TIMESTAMP NOT NULL,
|
|
||||||
expires TIMESTAMP NOT NULL,
|
expires TIMESTAMP NOT NULL,
|
||||||
type SMALLINT NOT NULL,
|
PRIMARY KEY (penguin_id, expires),
|
||||||
comment TEXT NOT NULL,
|
|
||||||
PRIMARY KEY (penguin_id, issued, expires),
|
|
||||||
CONSTRAINT warning_ibfk_1 FOREIGN KEY (penguin_id) REFERENCES penguin (id) ON DELETE CASCADE ON UPDATE CASCADE
|
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,
|
penguin_id = db.Column(db.ForeignKey('penguin.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True,
|
||||||
nullable=False)
|
nullable=False)
|
||||||
issued = db.Column(db.DateTime, primary_key=True, nullable=False)
|
|
||||||
expires = 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):
|
class Report(db.Model):
|
||||||
|
Loading…
Reference in New Issue
Block a user