diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20170424003227_create_account_domain_blocks.rb | 12 | ||||
-rw-r--r-- | db/schema.rb | 10 |
2 files changed, 21 insertions, 1 deletions
diff --git a/db/migrate/20170424003227_create_account_domain_blocks.rb b/db/migrate/20170424003227_create_account_domain_blocks.rb new file mode 100644 index 000000000..b9448aca4 --- /dev/null +++ b/db/migrate/20170424003227_create_account_domain_blocks.rb @@ -0,0 +1,12 @@ +class CreateAccountDomainBlocks < ActiveRecord::Migration[5.0] + def change + create_table :account_domain_blocks do |t| + t.integer :account_id + t.string :domain + + t.timestamps + end + + add_index :account_domain_blocks, [:account_id, :domain], unique: true + end +end diff --git a/db/schema.rb b/db/schema.rb index 00016e7c1..8246e665a 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,11 +10,19 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20170516072309) do +ActiveRecord::Schema.define(version: 20170517205741) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" + create_table "account_domain_blocks", force: :cascade do |t| + t.integer "account_id" + t.string "domain" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["account_id", "domain"], name: "index_account_domain_blocks_on_account_id_and_domain", unique: true, using: :btree + end + create_table "accounts", force: :cascade do |t| t.string "username", default: "", null: false t.string "domain" |