Use integer instead of bigint in DB migrations. And hope that this will turn out suitable for post IDs.
This commit is contained in:
parent
37cff9c4ba
commit
4e889f8df4
2 changed files with 31 additions and 2 deletions
|
|
@ -2,8 +2,8 @@ class CreateReposts < ActiveRecord::Migration
|
||||||
def change
|
def change
|
||||||
create_table :reposts do |t|
|
create_table :reposts do |t|
|
||||||
t.string :mentioned
|
t.string :mentioned
|
||||||
t.bigint :postid
|
t.integer :postid
|
||||||
t.bigint :repostid
|
t.integer :repostid
|
||||||
|
|
||||||
t.timestamps
|
t.timestamps
|
||||||
end
|
end
|
||||||
|
|
|
||||||
29
db/schema.rb
Normal file
29
db/schema.rb
Normal 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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue