Bugzilla – Attachment 42660 Details for
Bug 14321
Merge UploadedFile and UploadedFiles into Koha::Upload
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14321: Add two columns to uploaded_files
Bug-14321-Add-two-columns-to-uploadedfiles.patch (text/plain), 1.92 KB, created by
Julian Maurice
on 2015-09-17 13:07:25 UTC
(
hide
)
Description:
Bug 14321: Add two columns to uploaded_files
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2015-09-17 13:07:25 UTC
Size:
1.92 KB
patch
obsolete
>From 4c05c87a726983259a7d7fa83546bf7b66403cbe Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 6 Aug 2015 15:34:57 +0200 >Subject: [PATCH] Bug 14321: Add two columns to uploaded_files > >This patch adds uploaded_files.public and permanent. >Public will be used later to mark uploaded files as available via OPAC. >Permanent will be used to make the distinction between temporary and >permanent storage. > >The db rev sets both flags for all current records (uploaded via the >plugin from BZ 6874). > >Test plan: >[1] If you tested this before, drop the column public first. >[1] Run the dbrev. > >Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > installer/data/mysql/atomicupdate/14321a_public.sql | 5 +++++ > installer/data/mysql/kohastructure.sql | 2 ++ > 2 files changed, 7 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/14321a_public.sql > >diff --git a/installer/data/mysql/atomicupdate/14321a_public.sql b/installer/data/mysql/atomicupdate/14321a_public.sql >new file mode 100644 >index 0000000..ef251d8 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/14321a_public.sql >@@ -0,0 +1,5 @@ >+ALTER TABLE uploaded_files >+ ADD COLUMN public tinyint, >+ ADD COLUMN permanent tinyint; >+-- Any records already there are public and permanent storage >+UPDATE uploaded_files SET public=1, permanent=1; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index fd58258..21c6d6c 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -3361,6 +3361,8 @@ CREATE TABLE uploaded_files ( > dtcreated timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, > categorycode tinytext, > owner int(11), >+ public tinyint, >+ permanent tinyint, > PRIMARY KEY (id) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; > >-- >1.9.1
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 14321
:
41498
|
41499
|
41500
|
41501
|
41555
|
41556
|
41557
|
41558
|
41559
|
41560
|
41561
|
41562
|
41665
|
41666
|
41667
|
41668
|
41669
|
41677
|
41873
|
41874
|
41875
|
41876
|
41877
|
41878
|
41879
|
41880
|
41881
|
42411
|
42412
|
42413
|
42414
|
42558
|
42559
|
42560
|
42561
|
42584
|
42587
|
42588
|
42589
|
42590
|
42591
|
42660
|
42661
|
42662
|
42663
|
42664
|
42665
|
42666
|
42707
|
42726
|
42727
|
42728
|
42729
|
42730
|
42731
|
42732
|
42889
|
42890