added first full working version of embeddable elections
[selectricity] / db / migrate / 002_add_embeddable_support.rb
diff --git a/db/migrate/002_add_embeddable_support.rb b/db/migrate/002_add_embeddable_support.rb
new file mode 100644 (file)
index 0000000..48fa00d
--- /dev/null
@@ -0,0 +1,16 @@
+class AddEmbeddableSupport < ActiveRecord::Migration
+  def self.up
+    add_column :elections, :embeddable, :boolean,
+               :null => false, :default => false
+    add_column :elections, :authenticated, :boolean,
+               :null => false, :default => true
+    add_column :elections, :early_results, :boolean,
+               :null => false, :default => false
+  end
+
+  def self.down
+    remove_column :elections, :embeddable
+    remove_column :elections, :authenticated
+    remove_column :elections, :early_results
+  end
+end

Benjamin Mako Hill || Want to submit a patch?