23 lines
504 B
Bash
23 lines
504 B
Bash
#!/bin/bash
|
|
|
|
|
|
cat <<'EOF' | sqlite3 "$1"
|
|
CREATE TABLE IF NOT EXISTS files (
|
|
token text PRIMARY KEY,
|
|
name text NOT NULL,
|
|
added integer NOT NULL,
|
|
expires integer NOT NULL,
|
|
downloads integer NOT NULL,
|
|
max_downloads integer NOT NULL,
|
|
passhash text
|
|
);
|
|
EOF
|
|
|
|
cat <<'EOF' | sqlite3 "$1"
|
|
CREATE TABLE IF NOT EXISTS upload_tokens (
|
|
token text PRIMARY KEY,
|
|
added integer NOT NULL,
|
|
expires integer NOT NULL
|
|
);
|
|
EOF
|