Files
pfm-ocr/backend/db/migrations/003_create_vendor_master.sql
T

13 lines
402 B
SQL

-- Migration: 003_create_vendor_master
-- Description: Create vendors table and seed the initial vendor entry
CREATE TABLE IF NOT EXISTS vendors (
id SERIAL PRIMARY KEY,
name VARCHAR(255) UNIQUE NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT NOW()
);
INSERT INTO vendors (name)
VALUES ('PT. CHAROEN POKPHAND INDONESIA Tbk KAWASAN INDUSTRI MODERN, BANTEN')
ON CONFLICT (name) DO NOTHING;