37329-vm/db/migrations/001_create_listings_table.sql
2026-01-08 20:14:31 +00:00

22 lines
1.4 KiB
SQL

CREATE TABLE IF NOT EXISTS listings (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
description TEXT,
category VARCHAR(100),
address VARCHAR(255),
phone VARCHAR(20),
website VARCHAR(255),
is_verified BOOLEAN DEFAULT FALSE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Insert sample data
INSERT INTO listings (name, description, category, address, phone, website, is_verified) VALUES
('Green Leaf Cafe', 'A cozy cafe with organic coffee and homemade pastries.', 'Restaurants', '123 Main St, Anytown, USA', '555-1234', 'http://greenleafcafe.com', TRUE),
('QuickFix Plumbers', '24/7 emergency plumbing services.', 'Plumbers', '456 Oak Ave, Anytown, USA', '555-5678', 'http://quickfixplumbers.com', TRUE),
('The Cutting Edge', 'Modern hair salon for men and women.', 'Salons', '789 Pine Ln, Anytown, USA', '555-9012', 'http://thecuttingedge.com', FALSE),
('AutoCare Experts', 'Complete auto repair and maintenance services.', 'Auto Repair', '101 Maple Dr, Anytown, USA', '555-3456', 'http://autocareexperts.com', TRUE),
('Paws & Claws', 'Veterinary clinic and pet supply store.', 'Veterinarians', '212 Birch Rd, Anytown, USA', '555-7890', 'http://pawsandclaws.com', TRUE),
('Builder Bros.', 'Residential and commercial construction services.', 'Construction', '333 Elm St, Anytown, USA', '555-2345', 'http://builderbros.com', FALSE);