about summary refs log tree commit diff
path: root/db/migrate/20161009120834_create_domain_blocks.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20161009120834_create_domain_blocks.rb')
-rw-r--r--db/migrate/20161009120834_create_domain_blocks.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/db/migrate/20161009120834_create_domain_blocks.rb b/db/migrate/20161009120834_create_domain_blocks.rb
new file mode 100644
index 000000000..dda1606d3
--- /dev/null
+++ b/db/migrate/20161009120834_create_domain_blocks.rb
@@ -0,0 +1,10 @@
+class CreateDomainBlocks < ActiveRecord::Migration[5.0]
+  def change
+    create_table :domain_blocks do |t|
+      t.string :domain, null: false, default: ''
+      t.timestamps
+    end
+
+    add_index :domain_blocks, :domain, unique: true
+  end
+end