Fix format of database migrations

This commit is contained in:
Lars Henrik Mai 2020-03-09 12:29:34 +01:00
parent 3c9af21f2c
commit 163e43a3c9
5 changed files with 19 additions and 22 deletions

View file

@ -1,4 +1,4 @@
class CreateUsers < ActiveRecord::Migration
class CreateUsers < ActiveRecord::Migration[4.2]
def change
create_table :users do |t|
t.string :email

View file

@ -1,4 +1,4 @@
class CreatePapers < ActiveRecord::Migration
class CreatePapers < ActiveRecord::Migration[4.2]
def change
create_table :papers do |t|
t.string :name

View file

@ -1,4 +1,4 @@
class CreateImporters < ActiveRecord::Migration
class CreateImporters < ActiveRecord::Migration[4.2]
def change
create_table :importers do |t|
t.string :url

View file

@ -1,4 +1,4 @@
class CreatePaperSearches < ActiveRecord::Migration
class CreatePaperSearches < ActiveRecord::Migration[4.2]
def change
create_table :paper_searches do |t|
t.string :query

View file

@ -1,4 +1,3 @@
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
@ -14,7 +13,7 @@
ActiveRecord::Schema.define(version: 20151010070158) do
create_table "importers", force: :cascade do |t|
t.string "url"
t.string "url"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
@ -27,31 +26,29 @@ ActiveRecord::Schema.define(version: 20151010070158) do
end
create_table "papers", force: :cascade do |t|
t.string "name"
t.string "url"
t.string "reference"
t.string "body"
t.string "name"
t.string "url"
t.string "reference"
t.string "body"
t.datetime "published_at"
t.datetime "scraped_at"
t.string "paper_type"
t.string "originator"
t.text "resolution"
t.text "content"
t.string "paper_type"
t.string "originator"
t.text "resolution"
t.text "content"
t.datetime "created_at"
t.datetime "updated_at"
t.index ["body"], name: "index_papers_on_body"
t.index ["originator"], name: "index_papers_on_originator"
t.index ["reference", "body"], name: "index_papers_on_reference_and_body", unique: true
t.index ["reference"], name: "index_papers_on_reference"
end
add_index "papers", ["body"], name: "index_papers_on_body"
add_index "papers", ["originator"], name: "index_papers_on_originator"
add_index "papers", ["reference", "body"], name: "index_papers_on_reference_and_body", unique: true
add_index "papers", ["reference"], name: "index_papers_on_reference"
create_table "users", force: :cascade do |t|
t.string "email"
t.string "email"
t.datetime "created_at"
t.datetime "updated_at"
t.index ["email"], name: "index_users_on_email", unique: true
end
add_index "users", ["email"], name: "index_users_on_email", unique: true
end