Files
pastebin/init.sql

17 lines
722 B
SQL

-- Script de inicialização do banco SQLite3 para YASUC
-- Execute este script para criar a estrutura do banco
CREATE TABLE IF NOT EXISTS pastes (
short_id TEXT PRIMARY KEY,
content TEXT NOT NULL,
content_hash TEXT NOT NULL,
created_at INTEGER NOT NULL
);
-- Criar índices para melhorar performance
CREATE INDEX IF NOT EXISTS idx_pastes_content_hash ON pastes(content_hash);
CREATE INDEX IF NOT EXISTS idx_pastes_created_at ON pastes(created_at);
-- Inserir alguns dados de exemplo (opcional)
-- INSERT OR IGNORE INTO pastes (short_id, content, content_hash, created_at) VALUES
-- ('Ly34kx3', 'hello world', 'a948904f2f0f479b8f8197694b30184b0d2ed1c1cd2a1ec0fb85d299a192a447', strftime('%s', 'now'));