21 lines
812 B
SQL
21 lines
812 B
SQL
CREATE TABLE IF NOT EXISTS payment_types (
|
|
id INT AUTO_INCREMENT PRIMARY KEY,
|
|
name VARCHAR(255) NOT NULL,
|
|
type ENUM('cash', 'card', 'api') DEFAULT 'cash',
|
|
api_provider VARCHAR(50) DEFAULT NULL,
|
|
is_active BOOLEAN DEFAULT 1,
|
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
|
);
|
|
|
|
CREATE TABLE IF NOT EXISTS integration_settings (
|
|
id INT AUTO_INCREMENT PRIMARY KEY,
|
|
provider VARCHAR(50) NOT NULL,
|
|
setting_key VARCHAR(100) NOT NULL,
|
|
setting_value TEXT,
|
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
|
UNIQUE KEY unique_setting (provider, setting_key)
|
|
);
|
|
|
|
-- Attempt to add column, ignore if exists (standard SQL doesn't support IF NOT EXISTS for columns easily without procedures, but for this env we'll try)
|
|
-- We will run this via PHP and handle errors if column exists
|