- Implemented frontend views for products and subscriptions using FastAPI and Jinja2 templates. - Created API endpoints for managing subscriptions, including creation, listing, and status updates. - Added HTML templates for displaying active subscriptions and their statistics. - Established database migrations for sag_subscriptions, sag_subscription_items, and products, including necessary indexes and triggers for automatic subscription number generation. - Introduced product price history tracking to monitor changes in product pricing.
8 lines
285 B
SQL
8 lines
285 B
SQL
-- Migration 106: Add product_id to subscription items
|
|
|
|
ALTER TABLE sag_subscription_items
|
|
ADD COLUMN IF NOT EXISTS product_id INTEGER REFERENCES products(id) ON DELETE SET NULL;
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_sag_subscription_items_product
|
|
ON sag_subscription_items(product_id);
|