bb27c90ae4
Derive admin tabs and addon rows from enums, and add Redis/RabbitMQ/ES CPU/RAM/disk to deploy cost using the app runtime unit rates. Co-authored-by: Cursor <cursoragent@cursor.com>
25 lines
564 B
SQL
25 lines
564 B
SQL
-- Ensure pricing_rates rows exist for every AppRuntime enum value
|
|
|
|
INSERT INTO pricing_rates (runtime, resource_type, hourly_price, monthly_price, yearly_price)
|
|
SELECT r.runtime, t.resource_type, 0, 0, 0
|
|
FROM (
|
|
VALUES
|
|
('nodejs'),
|
|
('laravel'),
|
|
('wordpress'),
|
|
('go'),
|
|
('php'),
|
|
('python'),
|
|
('django'),
|
|
('dotnet')
|
|
) AS r(runtime)
|
|
CROSS JOIN (
|
|
VALUES
|
|
('base_fee'),
|
|
('cpu_per_core'),
|
|
('memory_per_gb'),
|
|
('storage_per_gb'),
|
|
('database_addon')
|
|
) AS t(resource_type)
|
|
ON CONFLICT (runtime, resource_type) DO NOTHING;
|