Commit ccb18766 authored by deepdey's avatar deepdey

chore(role): make project-id optional for db-schema

parent 22d2e8cd
......@@ -17,7 +17,7 @@ class Role(db.Model, CustomSerializerMixin):
role_type_id = db.Column(db.BigInteger, db.ForeignKey('role_type.id'))
role_name = db.Column(db.String(80), nullable=False)
project_id = db.Column(db.BigInteger, nullable=False)
project_id = db.Column(db.BigInteger, nullable=True)
created_at = db.Column(db.DATETIME, default=datetime.now)
updated_at = db.Column(db.DATETIME, onupdate=datetime.now)
......
......@@ -22,7 +22,7 @@ CREATE TABLE
id BIGSERIAL PRIMARY KEY NOT NULL,
role_type_id BIGINT NOT NULL,
role_name VARCHAR(80) NOT NULL,
project_id BIGINT NOT NULL,
project_id BIGINT,
is_deleted BOOLEAN DEFAULT false,
created_at TIMESTAMP NOT NULL DEFAULT now (),
updated_at TIMESTAMP,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment