DROP TABLE IF EXISTS storage_blob;
|
|
CREATE TABLE storage_blob
|
(
|
id bigserial PRIMARY KEY,
|
created_at timestamp default now() NOT NULL,
|
key varchar(150) DEFAULT '' NOT NULL,
|
content_type varchar(100) DEFAULT '' NOT NULL,
|
filename varchar(255) DEFAULT '' NOT NULL,
|
byte_size bigint DEFAULT 0 NOT NULL,
|
UNIQUE (key)
|
);
|
|
COMMENT ON TABLE storage_blob IS '通用文件上传的附件信息';
|
|
COMMENT ON COLUMN storage_blob.key IS '资源id';
|
COMMENT ON COLUMN storage_blob.content_type IS '资源类型,例如JPG图片的资源类型为image/jpg';
|
COMMENT ON COLUMN storage_blob.filename IS '文件名';
|
COMMENT ON COLUMN storage_blob.byte_size IS '资源尺寸(字节)';
|