Bugzilla – Attachment 39652 Details for
Bug 14295
Add creation time, size and owner for uploaded files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14295: Database revision: add three columns to uploaded_files
Bug-14295-Database-revision-add-three-columns-to-u.patch (text/plain), 1.91 KB, created by
Marcel de Rooy
on 2015-05-29 07:02:32 UTC
(
hide
)
Description:
Bug 14295: Database revision: add three columns to uploaded_files
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2015-05-29 07:02:32 UTC
Size:
1.91 KB
patch
obsolete
>From db1ef84e98fa2e668abaae53b1df0731f16040cb Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 29 May 2015 08:52:58 +0200 >Subject: [PATCH] Bug 14295: Database revision: add three columns to > uploaded_files >Content-Type: text/plain; charset=utf-8 > >This patch adds three columns to table uploaded_files. >Col filesize will be helpful when checking quota. >Col owner will be helpful in terms of optional permissions and security. >Col dtcreated tells you when the file was uploaded. > >Test plan: >Run the database revision. >Run a new install or run kohastructure.sql. >--- > installer/data/mysql/atomicupdate/14295.sql | 5 +++++ > installer/data/mysql/kohastructure.sql | 6 +++++- > 2 files changed, 10 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/14295.sql > >diff --git a/installer/data/mysql/atomicupdate/14295.sql b/installer/data/mysql/atomicupdate/14295.sql >new file mode 100644 >index 0000000..143217a >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/14295.sql >@@ -0,0 +1,5 @@ >+ALTER TABLE uploaded_files >+ ADD COLUMN filesize int, >+ ADD COLUMN dtcreated timestamp NOT NULL default CURRENT_TIMESTAMP, >+ ADD COLUMN owner int, >+ ADD CONSTRAINT FOREIGN KEY (owner) REFERENCES borrowers (borrowernumber); >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 6fc2452..98572a4 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -3358,7 +3358,11 @@ DROP TABLE IF EXISTS uploaded_files; > CREATE TABLE uploaded_files ( > id CHAR(40) NOT NULL PRIMARY KEY, > filename TEXT NOT NULL, >- dir TEXT NOT NULL >+ dir TEXT NOT NULL, >+ filesize int, >+ dtcreated timestamp NOT NULL default CURRENT_TIMESTAMP, >+ owner int, >+ FOREIGN KEY (owner) REFERENCES borrowers (borrowernumber) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; > > -- >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14295
: 39652 |
39653