4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/github/archive/create_archive.rb', line 4
def self.do
ActiveRecord::Schema.define do
unless Github::Archive::ArchivedUrl.table_exists?
create_table :archived_urls do |table|
table.column :url, :string
table.column :finished_processing, :boolean
end
add_index :archived_urls,:url
end
unless Github::Archive::Event.table_exists?
create_table :events do |table|
table.column :url, :string
table.column :event_type, :string
table.column :gh_created_at, :datetime
end
add_index :events, :url
add_index :events, :event_type
add_index :events, :gh_created_at
end
end
end
|