feat(ledger): add bookkeeping workbench and transaction views
- Add transactions_dirty table and zero-tolerance cleansing action - Implement bookkeeping workbench (/bookkeeping) with searchable Combobox channel selector and card suffix / account identifier - Implement transaction ledger (/transactions) with date groupings, multi-currency metrics, and filters - Update AGENTS.md guidelines for Base UI Select and Combobox bindings
This commit is contained in:
+15
-15
@@ -1,22 +1,22 @@
|
||||
import postgres from "postgres";
|
||||
import * as dotenv from "dotenv";
|
||||
import postgres from "postgres"
|
||||
import * as dotenv from "dotenv"
|
||||
|
||||
dotenv.config({ path: ".env.local" });
|
||||
dotenv.config({ path: ".env.local" })
|
||||
|
||||
const sql = postgres(process.env.DATABASE_URL!);
|
||||
const sql = postgres(process.env.DATABASE_URL!)
|
||||
|
||||
async function resetAndInit() {
|
||||
console.log("Dropping old tables...");
|
||||
await sql`DROP TABLE IF EXISTS transactions CASCADE`;
|
||||
await sql`DROP TABLE IF EXISTS channels CASCADE`;
|
||||
await sql`DROP TABLE IF EXISTS accounts CASCADE`;
|
||||
await sql`DROP TABLE IF EXISTS user_accounts CASCADE`;
|
||||
await sql`DROP TABLE IF EXISTS users CASCADE`;
|
||||
console.log("Old tables dropped.");
|
||||
await sql.end();
|
||||
console.log("Dropping old tables...")
|
||||
await sql`DROP TABLE IF EXISTS transactions CASCADE`
|
||||
await sql`DROP TABLE IF EXISTS channels CASCADE`
|
||||
await sql`DROP TABLE IF EXISTS accounts CASCADE`
|
||||
await sql`DROP TABLE IF EXISTS user_accounts CASCADE`
|
||||
await sql`DROP TABLE IF EXISTS users CASCADE`
|
||||
console.log("Old tables dropped.")
|
||||
await sql.end()
|
||||
}
|
||||
|
||||
resetAndInit().catch((err) => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
console.error(err)
|
||||
process.exit(1)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user