-- Rename permit → subscription (master data only). The signed ledger keeps its -- immutable `permitId` payload — NOT touched here. Data-preserving ALTER RENAMEs -- (SQLite 3.25+) rather than drop/recreate, so existing subscriptions survive. -- Adds per-subscription pricing (price_minor + period + currency) and a site-wide -- default monthly price. See wiki/entities/subscription.md. ALTER TABLE `permits` RENAME TO `subscriptions`; --> statement-breakpoint ALTER TABLE `permit_credentials` RENAME TO `subscription_credentials`; --> statement-breakpoint ALTER TABLE `subscription_credentials` RENAME COLUMN `permit_id` TO `subscription_id`; --> statement-breakpoint ALTER TABLE `permit_plates` RENAME TO `subscription_plates`; --> statement-breakpoint ALTER TABLE `subscription_plates` RENAME COLUMN `permit_id` TO `subscription_id`; --> statement-breakpoint ALTER TABLE `subscriptions` ADD `price_minor` integer; --> statement-breakpoint ALTER TABLE `subscriptions` ADD `period` text DEFAULT 'monthly' NOT NULL; --> statement-breakpoint ALTER TABLE `subscriptions` ADD `currency` text; --> statement-breakpoint ALTER TABLE `sessions` RENAME COLUMN `permit_id` TO `subscription_id`; --> statement-breakpoint ALTER TABLE `site_config` ADD `subscription_monthly_price_minor` integer;