Add gross monthly and yearly plan pricing
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
-- Add billing period and gross price snapshot to existing instances.
|
||||
ALTER TABLE instances
|
||||
ADD COLUMN IF NOT EXISTS billing_period ENUM('monthly', 'yearly') NOT NULL DEFAULT 'monthly' AFTER plan,
|
||||
ADD COLUMN IF NOT EXISTS price_gross_cents INT UNSIGNED NOT NULL DEFAULT 0 AFTER billing_period;
|
||||
@@ -72,6 +72,8 @@ CREATE TABLE IF NOT EXISTS instances (
|
||||
owner_user_id BIGINT UNSIGNED NOT NULL,
|
||||
name VARCHAR(120) NOT NULL,
|
||||
plan ENUM('s', 'm', 'l') NOT NULL DEFAULT 's',
|
||||
billing_period ENUM('monthly', 'yearly') NOT NULL DEFAULT 'monthly',
|
||||
price_gross_cents INT UNSIGNED NOT NULL DEFAULT 0,
|
||||
payment_status ENUM('pending', 'paid', 'rejected') NOT NULL DEFAULT 'pending',
|
||||
payment_method ENUM('paypal', 'bank_transfer', 'manual') NULL,
|
||||
requested_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
|
||||
Reference in New Issue
Block a user