about summary refs log tree commit diff
path: root/db
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-10-09 14:48:43 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-10-09 14:48:59 +0200
commit22a8801dbc77d2d01b326a7cb89d1a28b054e073 (patch)
tree11a3a99e98df33cbb73da818419fa0227b1dc664 /db
parent52d7f862d365acfd4eacbe448238699d9662708d (diff)
Adding domain blocks
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20161009120834_create_domain_blocks.rb10
-rw-r--r--db/schema.rb9
2 files changed, 18 insertions, 1 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
diff --git a/db/schema.rb b/db/schema.rb
index 6c21013b2..773c6bf6a 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
 #
 # It's strongly recommended that you check this file into your version control system.
 
-ActiveRecord::Schema.define(version: 20161006213403) do
+ActiveRecord::Schema.define(version: 20161009120834) do
 
   # These are extensions that must be enabled in order to support this database
   enable_extension "plpgsql"
@@ -51,6 +51,13 @@ ActiveRecord::Schema.define(version: 20161006213403) do
     t.index ["account_id", "target_account_id"], name: "index_blocks_on_account_id_and_target_account_id", unique: true, using: :btree
   end
 
+  create_table "domain_blocks", force: :cascade do |t|
+    t.string   "domain",     default: "", null: false
+    t.datetime "created_at",              null: false
+    t.datetime "updated_at",              null: false
+    t.index ["domain"], name: "index_domain_blocks_on_domain", unique: true, using: :btree
+  end
+
   create_table "favourites", force: :cascade do |t|
     t.integer  "account_id", null: false
     t.integer  "status_id",  null: false