Class: Jazari::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
ActiveRecord::Generators::Migration
Defined in:
lib/generators/jazari/install/install_generator.rb

Overview

Hosts adopt these tables DELIBERATELY. The gem never auto-appends its migrations to a host's schema — a shared operations table appearing in someone's next db:migrate without them asking for it is exactly the kind of surprise that makes a gem untrustworthy in a production fleet.

Instance Method Summary collapse

Instance Method Details

#copy_migrationObject



19
20
21
# File 'lib/generators/jazari/install/install_generator.rb', line 19

def copy_migration
  migration_template "create_jazari_tables.rb", "db/migrate/create_jazari_tables.rb"
end

#reportObject



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/generators/jazari/install/install_generator.rb', line 23

def report
  say ""
  say "jazari: migration copied. Next:"
  say "  1. bin/rails db:migrate"
  say "  2. Seed your own recipes — the gem ships none by design."
  say "  3. Jazari.configure { |c| c.anchor_scopes = { ... } } at boot."
  say ""
  say "PostgreSQL is required: jsonb, timestamptz, CHECK constraints, and a"
  say "partial unique index over a COALESCEd polymorphic subject."
  say ""
end