mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
Merge branch 'feat/BE/Sprint-6' of https://gitlab.com/mbugroup/lti-api into feat/BE/US-279/closing-produksi
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
DROP INDEX IF EXISTS documents_documentable_polymorphic;
|
||||
DROP TABLE IF EXISTS documents;
|
||||
@@ -0,0 +1,14 @@
|
||||
CREATE TABLE documents (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
documentable_type VARCHAR(50) NOT NULL,
|
||||
documentable_id BIGINT NOT NULL,
|
||||
type VARCHAR(50) NOT NULL,
|
||||
path VARCHAR(50) NOT NULL,
|
||||
name VARCHAR(50) NOT NULL,
|
||||
ext VARCHAR(50) NOT NULL,
|
||||
size NUMERIC(15, 3) NOT NULL,
|
||||
created_by BIGINT REFERENCES users (id) ON DELETE RESTRICT ON UPDATE CASCADE,
|
||||
created_at TIMESTAMPTZ DEFAULT now()
|
||||
);
|
||||
|
||||
CREATE INDEX documents_documentable_polymorphic ON documents (documentable_type, documentable_id);
|
||||
Reference in New Issue
Block a user