This refactors a part of the database and adds a new "sync" command that reuses a lot of the backup logic to take a set of sources and apply them to a backend. Unlike the backup process, the sync copies files verbatim without any encryption.
19 lines
556 B
SQL
19 lines
556 B
SQL
|
|
CREATE TABLE "RemoteVolume_Temp" (
|
|
"ID" INTEGER PRIMARY KEY,
|
|
"OperationID" INTEGER NOT NULL,
|
|
"Name" TEXT NOT NULL,
|
|
"Type" TEXT NOT NULL,
|
|
"Size" INTEGER NULL,
|
|
"Hash" TEXT NULL,
|
|
"State" TEXT NOT NULL,
|
|
"VerificationCount" INTEGER NOT NULL,
|
|
"DeleteGraceTime" INTEGER NOT NULL
|
|
);
|
|
|
|
INSERT INTO "RemoteVolume_Temp" SELECT "ID", "OperationID", "Name", "Type", "Size", "Hash", "State", "VerificationCount", 0 FROM "RemoteVolume";
|
|
DROP TABLE "RemoteVolume";
|
|
ALTER TABLE "RemoteVolume_Temp" RENAME TO "RemoteVolume";
|
|
|
|
UPDATE "Version" SET "Version" = 3;
|