base
This commit is contained in:
@@ -23,7 +23,7 @@ CREATE TABLE IF NOT EXISTS files (
|
||||
path TEXT PRIMARY KEY,
|
||||
size BIGINT NOT NULL,
|
||||
modified_time DOUBLE PRECISION NOT NULL,
|
||||
disk TEXT NOT NULL,
|
||||
disk_label TEXT NOT NULL,
|
||||
checksum TEXT,
|
||||
status TEXT DEFAULT 'indexed',
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
@@ -31,14 +31,14 @@ CREATE TABLE IF NOT EXISTS files (
|
||||
);
|
||||
|
||||
-- Create index on disk column for faster queries
|
||||
CREATE INDEX IF NOT EXISTS idx_files_disk ON files(disk);
|
||||
CREATE INDEX IF NOT EXISTS idx_files_disk ON files(disk_label);
|
||||
CREATE INDEX IF NOT EXISTS idx_files_status ON files(status);
|
||||
|
||||
-- Create operations table
|
||||
CREATE TABLE IF NOT EXISTS operations (
|
||||
id SERIAL PRIMARY KEY,
|
||||
source_path TEXT NOT NULL,
|
||||
dest_path TEXT NOT NULL,
|
||||
target_path TEXT NOT NULL,
|
||||
operation_type TEXT NOT NULL,
|
||||
executed INTEGER DEFAULT 0,
|
||||
verified INTEGER DEFAULT 0,
|
||||
|
||||
Reference in New Issue
Block a user