Sfoglia il codice sorgente

Added migrations to generator

Andrew Kane 9 anni fa
parent
commit
78284b6502
1 ha cambiato i file con 12 aggiunte e 0 eliminazioni
  1. 12 0
      lib/generators/blazer/templates/install.rb

+ 12 - 0
lib/generators/blazer/templates/install.rb

@@ -21,5 +21,17 @@ class <%= migration_class_name %> < ActiveRecord::Migration
       t.text :emails
       t.timestamps
     end
+
+    create_table :blazer_dashboards do |t|
+      t.text :name
+      t.timestamps
+    end
+
+    create_table :blazer_dashboard_queries do |t|
+      t.references :blazer_dashboard
+      t.references :blazer_query
+      t.integer :position
+      t.timestamps
+    end
   end
 end