Colin L. wrote in post #1068939:
On 16 July 2012 16:43, Jean-Sbastien D. [email protected] wrote:
Is it possible, or is dead wrong?
As I said it looks ok to me. Show us your db/schema.rb
Colin
This is my schema
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 to check this file into your version control
system.
ActiveRecord::Schema.define(:version => 20120713204006) do
create_table “customers”, :force => true do |t|
t.string “first”
t.string “last”
t.string “username”
t.string “password”
t.boolean “consent”
t.string “normal_avatar”
t.string “security_question”
t.string “security_answer”
t.integer “security_level”
t.integer “organization_level_id”
t.integer “version”
t.string “timezone”
t.datetime “last_visited”
t.datetime “registered_on”
t.boolean “is_activated”
t.boolean “approval_pending”
t.datetime “created_at”, :null => false
t.datetime “updated_at”, :null => false
end
create_table “customizeds”, :force => true do |t|
t.integer “customer_id”
t.string “background”
t.datetime “created_at”, :null => false
t.datetime “updated_at”, :null => false
end
create_table “date_of_births”, :force => true do |t|
t.date “customer_date”
t.integer “customer_id”
t.datetime “modify_on”
t.integer “friendship_group_id”
t.boolean “visible”
t.boolean “activated_field”
t.datetime “created_at”, :null => false
t.datetime “updated_at”, :null => false
end
create_table “friendship_groups”, :force => true do |t|
t.string “description”
t.datetime “created_at”, :null => false
t.datetime “updated_at”, :null => false
end
create_table “tv_show_managers”, :force => true do |t|
t.integer “tv_show_id”
t.integer “customer_id”
t.datetime “modify_on”
t.integer “friendship_group_id”
t.boolean “visible”
t.boolean “activated_field”
t.datetime “created_at”, :null => false
t.datetime “updated_at”, :null => false
end
create_table “tv_shows”, :force => true do |t|
t.string “description”
t.datetime “created_at”, :null => false
t.datetime “updated_at”, :null => false
end
end
But i think its looks good, should i also reinforce in my model foreign
key so it doesnt get confused