CREATE TABLE members (
id TEXT PRIMARY KEY,
name TEXT NOT NULL,
joined_at DATETIME DEFAULT CURRENT_TIMESTAMP,
state TEXT DEFAULT 'Tamil Nadu',
reputation_score INTEGER DEFAULT 100
);
CREATE TABLE mandates (
id TEXT PRIMARY KEY,
title TEXT NOT NULL,
description TEXT,
deadline DATETIME,
status TEXT CHECK(status IN ('pending', 'in_progress', 'fulfilled', 'overdue'))
);
CREATE TABLE treasury (
id TEXT PRIMARY KEY,
amount REAL NOT NULL,
type TEXT CHECK(type IN ('donation', 'stipend', 'expense')),
pan_number TEXT,
voucher_id TEXT REFERENCES mandates(id)
);
npx wrangler init aramaran-instance
npx wrangler d1 create aramaran-db-live --location=in-south
npx wrangler d1 execute aramaran-db-live --file=./schema.sql
npx wrangler deploy --name=aramaran-instance