Use integer instead of bigint in DB migrations. And hope that this will turn out suitable for post IDs.

This commit is contained in:
Señor Rolando 2013-12-08 13:15:31 +01:00
parent 37cff9c4ba
commit 4e889f8df4
2 changed files with 31 additions and 2 deletions

View file

@ -2,8 +2,8 @@ class CreateReposts < ActiveRecord::Migration
def change
create_table :reposts do |t|
t.string :mentioned
t.bigint :postid
t.bigint :repostid
t.integer :postid
t.integer :repostid
t.timestamps
end

29
db/schema.rb Normal file
View file

@ -0,0 +1,29 @@
# 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.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20131208115327) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
create_table "reposts", force: true do |t|
t.string "mentioned"
t.integer "postid"
t.integer "repostid"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "reposts", ["repostid"], name: "index_reposts_on_repostid", using: :btree
end