Update: 2026-05-15 03:09:36
This commit is contained in:
@@ -23,6 +23,29 @@ CREATE TABLE IF NOT EXISTS rides (
|
||||
INDEX (platform)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- Subscription System
|
||||
CREATE TABLE IF NOT EXISTS subscriptions (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
fingerprint VARCHAR(255) NOT NULL,
|
||||
plan ENUM('free', 'basic', 'pro', 'annual') DEFAULT 'free',
|
||||
started_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
expires_at TIMESTAMP NULL,
|
||||
is_active TINYINT(1) DEFAULT 1,
|
||||
payment_ref VARCHAR(255),
|
||||
INDEX (fingerprint),
|
||||
INDEX (expires_at)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- Daily Usage Quotas
|
||||
CREATE TABLE IF NOT EXISTS daily_usage (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
fingerprint VARCHAR(255) NOT NULL,
|
||||
usage_date DATE NOT NULL,
|
||||
rides_accepted INT DEFAULT 0,
|
||||
UNIQUE KEY unique_daily (fingerprint, usage_date),
|
||||
INDEX (fingerprint)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- Table to store driver locations for map updating
|
||||
CREATE TABLE IF NOT EXISTS driver_locations (
|
||||
id BIGINT AUTO_INCREMENT PRIMARY KEY,
|
||||
|
||||
Reference in New Issue
Block a user