2020-03-09 12:29:34 +01:00
|
|
|
class CreatePapers < ActiveRecord::Migration[4.2]
|
2015-04-27 21:02:26 +02:00
|
|
|
def change
|
2015-04-13 22:09:28 +02:00
|
|
|
create_table :papers do |t|
|
2023-04-02 22:40:57 +02:00
|
|
|
# t.string :name
|
2015-04-13 22:09:28 +02:00
|
|
|
t.string :url
|
|
|
|
t.string :reference
|
|
|
|
t.string :name
|
2015-05-17 17:49:09 +02:00
|
|
|
t.string :body
|
2015-04-13 22:09:28 +02:00
|
|
|
t.datetime :published_at
|
|
|
|
t.datetime :scraped_at
|
|
|
|
t.string :paper_type
|
|
|
|
t.string :originator
|
|
|
|
t.text :resolution
|
|
|
|
t.text :content
|
|
|
|
|
|
|
|
t.timestamps
|
|
|
|
end
|
2015-05-17 17:49:09 +02:00
|
|
|
|
|
|
|
add_index(:papers, :reference)
|
|
|
|
add_index(:papers, :originator)
|
|
|
|
add_index(:papers, :body)
|
2020-03-09 14:55:53 +01:00
|
|
|
add_index(:papers, %i[reference body], unique: true)
|
2015-04-13 22:09:28 +02:00
|
|
|
end
|
|
|
|
end
|