SAAS-596: Store file size and hash in database
Updated schema and added filesize and md5_hash columns. Changed getFileSize functions to return the value stored in the database. Removed getFileSize from the cloud storage classes.
This commit is contained in:
parent
a1436bfebb
commit
6ccc634782
12 changed files with 238 additions and 53 deletions
|
@ -82,6 +82,8 @@
|
|||
<column name="hidden" phpName="DbHidden" type="BOOLEAN" defaultValue="false"/>
|
||||
<column name="is_scheduled" phpName="DbIsScheduled" type="BOOLEAN" defaultValue="false"/>
|
||||
<column name="is_playlist" phpName="DbIsPlaylist" type="BOOLEAN" defaultValue="false"/>
|
||||
<column name="filesize" phpName="DbFilesize" type="Integer" required="true" defaultValue="0"/>
|
||||
<column name="md5_hash" phpName="DbMd5Hash" type="VARCHAR" size="512" required="true" defaultValue="" />
|
||||
<foreign-key foreignTable="cc_subjs" phpName="FkOwner" name="cc_files_owner_fkey">
|
||||
<reference local="owner_id" foreign="id"/>
|
||||
</foreign-key>
|
||||
|
|
|
@ -94,6 +94,8 @@ CREATE TABLE "cc_files"
|
|||
"hidden" BOOLEAN DEFAULT 'f',
|
||||
"is_scheduled" BOOLEAN DEFAULT 'f',
|
||||
"is_playlist" BOOLEAN DEFAULT 'f',
|
||||
"filesize" INTEGER DEFAULT 0 NOT NULL,
|
||||
"md5_hash" VARCHAR(512) DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
|
@ -185,11 +187,7 @@ CREATE TABLE "cc_show_instances"
|
|||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
COMMENT ON TABLE "cc_show_instances" IS '';
|
||||
|
||||
|
||||
SET search_path TO public;
|
||||
-----------------------------------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
-- cc_show_days
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue