Files
duplicati/Duplicati/GUI/Database schema/2. Refactor for easier extensions.sql
T
kenneth.skovhede@gmail.com b81d63ea73 Fixed a bug with async uploads that caused some files to no be uploaded.
Fixed a protential race condition with warning messages and file counts (cosmetic only) when using async transfers.
Spelling correction, Seperator -> Separator.
Changed so a restore operation can also supply advanced options.
Changed the format of timestamps in filenames to follow the Duplicity convention, which removes the need for --time-separator and --use-short-filenames.
Moved the URL utility into Core, to avoid compilation errors with Monodevelop.
Reorganized the runner to better support the LiveControls on all operations rather than only for backup/restore.

Update issue #210
Status: Fixed
I have now changed the time format to follow the Duplicity naming convention.
This means that all filenames are now generated with the time set as "yyyyMMddTHHmmssZ".
This format is more portable across all platforms, and easily sortable/readable.
The drawback is that the Z indicates UTC time, so if one looks at the filenames, 
the times are not local. The motivation for this is to avoid trouble
with daylight savings time offsets.

There is full backwards compatibility as long as backups have not used more than
one character for --time-separator (only possible via commandline).
This new format means that the options --time-separator and --use-short-filenames
are now deprecated and removed from the user interface. It is possible to
access them from the advanced options page, along with the --use-old-filenames option.

If anyone needs these options for some reason, let me know, otherwise they will be removed
in a later version.



git-svn-id: https://duplicati.googlecode.com/svn/trunk@523 59da171f-624f-0410-aa54-27559c288bec
2010-09-25 12:02:14 +00:00

57 lines
2.5 KiB
SQL

-- TaskSettings becomes BackendSetting
ALTER TABLE TaskSetting RENAME TO BackendSetting;
-- TaskSetting is now extensions
CREATE TABLE "TaskExtension" (
"ID" INTEGER PRIMARY KEY,
"TaskID" INTEGER NULL,
"Name" TEXT NULL,
"Value" TEXT NULL
);
-- Copy values from the Task table
INSERT INTO TaskExtension ([TaskID], [Name], [Value]) SELECT [ID], 'Max Upload Size', [MaxUploadSize] FROM Task;
INSERT INTO TaskExtension ([TaskID], [Name], [Value]) SELECT [ID], 'Upload bandwidth', [UploadBandwidth] FROM Task;
INSERT INTO TaskExtension ([TaskID], [Name], [Value]) SELECT [ID], 'Download Bandwidth', [DownloadBandwidth] FROM Task;
INSERT INTO TaskExtension ([TaskID], [Name], [Value]) SELECT [ID], 'Volume Size', [VolumeSize] FROM Task;
INSERT INTO TaskExtension ([TaskID], [Name], [Value]) SELECT [ID], 'Thread Priority', [ThreadPriority] FROM Task;
INSERT INTO TaskExtension ([TaskID], [Name], [Value]) SELECT [ID], 'Async Transfer', [AsyncTransfer] FROM Task;
INSERT INTO TaskExtension ([TaskID], [Name], [Value]) SELECT [ID], 'Include Setup', [IncludeSetup] FROM Task;
INSERT INTO TaskExtension ([TaskID], [Name], [Value]) SELECT [ID], 'Ignore Timestamps', [IgnoreTimestamps] FROM Task;
-- Move FileTimeSeparator into extensions
INSERT INTO TaskExtension ([TaskID], [Name], [Value]) SELECT [TaskID], 'File Time Seperator', Value FROM BackendSetting WHERE [Name] = 'TimeSeparator';
DELETE FROM BackendSetting WHERE [Name] = 'TimeSeparator';
-- Create a reduced Task table
CREATE TABLE "TempTask" (
"ID" INTEGER PRIMARY KEY,
"ScheduleID" INTEGER NULL,
"Service" TEXT NULL,
"Encryptionkey" TEXT NULL,
"Signaturekey" TEXT NULL,
"SourcePath" TEXT NULL,
"KeepFull" INTEGER NULL,
"KeepTime" TEXT NULL,
"FullAfter" TEXT NULL,
"GPGEncryption" BOOLEAN NULL,
"IncludeSetup" BOOLEAN NULL
);
-- Copy values
INSERT INTO TempTask ([ID], [ScheduleID], [Service], [EncryptionKey], [SignatureKey], [SourcePath], [KeepFull], [KeepTime], [FullAfter], [GPGEncryption], [IncludeSetup]) SELECT [ID], [ScheduleID], [Service], [EncryptionKey], [SignatureKey], [SourcePath], [KeepFull], [KeepTime], [FullAfter], [GPGEncryption], [IncludeSetup] FROM Task;
DROP TABLE Task;
-- Use the new reduced table
ALTER TABLE "TempTask" RENAME TO "Task";
-- Add the override table
CREATE TABLE "TaskOverride" (
"ID" INTEGER PRIMARY KEY,
"TaskID" INTEGER NULL,
"Name" TEXT NULL,
"Value" TEXT NULL
);
-- Reduce database size
VACUUM;