Skip to content
This repository has been archived by the owner on Jan 17, 2019. It is now read-only.

Commit

Permalink
Add schema.rb
Browse files Browse the repository at this point in the history
TODO: Extract RDBMS related configrations
  • Loading branch information
okkez committed Jan 22, 2016
1 parent 9c0d951 commit 0ea3638
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions db/schema.rb
@@ -0,0 +1,15 @@
require "active_record"

ActiveRecord::Base.establish_connection(adapter: "sqlite3",
database: "storage.db")

ActiveRecord::Schema.define(version: 1) do
create_table :pages do |t|
t.string :url
t.text :headers
t.binary :body, limit: 10 * 1024 ** 2 # 10MiB
t.datetime :last_modified_at
t.string :etag
t.timestamps
end
end

0 comments on commit 0ea3638

Please sign in to comment.