Files
fizzy/saas/db/migrate/20251203144630_create_account_subscriptions.rb
T
Jorge Manrubia 984a5dd4ce Add Stripe-based billing system
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Jason Zimdars <jz@37signals.com>
2025-12-16 12:00:23 +01:00

16 lines
490 B
Ruby

class CreateAccountSubscriptions < ActiveRecord::Migration[8.2]
def change
create_table :account_subscriptions, id: :uuid do |t|
t.references :account, null: false, type: :uuid, index: true
t.string :plan_key
t.string :stripe_customer_id, null: false, index: { unique: true }
t.string :stripe_subscription_id, index: { unique: true }
t.string :status
t.datetime :current_period_end
t.datetime :cancel_at
t.timestamps
end
end
end