Skip to content

Commit

Permalink
(#189) Alterando criterios para tinyint
Browse files Browse the repository at this point in the history
  • Loading branch information
oEduardoAfonso committed May 5, 2021
1 parent 639bd64 commit 3eb61ea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions app/model/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ class Post(db.Model):
id_post = db.Column(db.Integer, nullable=False,
primary_key=True, autoincrement=True)
post_date = db.Column(db.Date, default=date.today(), nullable=False)
didactic = db.Column(db.Float, nullable=False)
metod = db.Column(db.Float, nullable=False)
avaliations = db.Column(db.Float, nullable=False)
disponibility = db.Column(db.Float, nullable=False)
didactic = db.Column(db.Integer, nullable=False)
metod = db.Column(db.Integer, nullable=False)
avaliations = db.Column(db.Integer, nullable=False)
disponibility = db.Column(db.Integer, nullable=False)
content = db.Column(db.String(480), nullable=False)
is_anonymous = db.Column(db.Boolean, nullable=False)

Expand Down
8 changes: 4 additions & 4 deletions database/database.sql
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ CREATE TABLE IF NOT EXISTS post (
id_professor int UNSIGNED NOT NULL,
content varchar(480) NOT NULL,
post_date date NOT NULL,
didactic float NOT NULL,
metod float NOT NULL,
avaliations float NOT NULL,
disponibility float NOT NULL,
didactic TINYINT UNSIGNED NOT NULL,
metod TINYINT UNSIGNED NOT NULL,
avaliations TINYINT UNSIGNED NOT NULL,
disponibility TINYINT UNSIGNED NOT NULL,
discipline_code varchar(80) NOT NULL DEFAULT '',
is_anonymous TINYINT(1) NOT NULL,
PRIMARY KEY (id_post),
Expand Down

0 comments on commit 3eb61ea

Please sign in to comment.