Files
cannaiq/backend/archive/create-azdhs-table.ts
Kelly d91c55a344 feat: Add stale process monitor, users route, landing page, archive old scripts
- Add backend stale process monitoring API (/api/stale-processes)
- Add users management route
- Add frontend landing page and stale process monitor UI on /scraper-tools
- Move old development scripts to backend/archive/
- Update frontend build with new features

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 04:07:31 -07:00

33 lines
811 B
TypeScript

import { pool } from './src/db/migrate';
async function createAZDHSTable() {
console.log('🗄️ Creating azdhs_list table...\n');
await pool.query(`
CREATE TABLE IF NOT EXISTS azdhs_list (
id SERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
company_name VARCHAR(255),
slug VARCHAR(255),
address VARCHAR(500),
city VARCHAR(100),
state VARCHAR(2) DEFAULT 'AZ',
zip VARCHAR(10),
phone VARCHAR(20),
email VARCHAR(255),
status_line TEXT,
azdhs_url TEXT,
latitude DECIMAL(10, 8),
longitude DECIMAL(11, 8),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
`);
console.log('✅ Table created successfully!');
await pool.end();
}
createAZDHSTable();