Class: V2Schema

Inherits:
Object
  • Object
show all
Defined in:
lib/miteru/database.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/miteru/database.rb', line 4

def change
  create_table :records, if_not_exists: true do |t|
    t.string :sha256, null: false, index: {unique: true}
    t.string :hostname, null: false
    t.json :headers, null: false
    t.text :filename, null: false
    t.string :downloaded_as, null: false
    t.integer :filesize, null: false
    t.string :mime_type, null: false
    t.text :url, null: false
    t.string :source, null: false

    t.timestamps
  end
end