search for: home_team_id

Displaying 4 results from an estimated 4 matches for "home_team_id".

2006 Mar 07
13
Active Record - Can''t figure out relationship.
...table teams ( id int not null auto_increment, short_name varchar(12) not null, long_name varchar(50) not null, logo varchar(20) not null, primary key (id) ); create table rounds ( id int not null auto_increment, home_team_id int not null, away_team_id int not null, round tinyint(4) not null, home_team_score tinyint(8) not null, away_team_score tinyint(8) not null, constraint fk_home_teams foreign key (home_team_id) references teams(id), constraint fk_away_teams f...
2007 Jun 09
7
create 2 fk referencing the same table
Hi everyone! I have a problem with defining 2 fk referencing the same table. I have a Program table and a Team table. The Program should have an away team and a home team fk. From my understanding, "the fk column should be named after the class of the target table, converted to lowercase, with _id appended". But, in my case, I have 2 fk referencing the same table. How can I do this?
2006 May 14
3
Strange Database Mapping Question
Dear Rails List, I am new on the list so will assume straight away that this question has been answered before. As I can see no immediate way of searching the list, I will ask the question. I apologize in advance for any disruption this may cause. Question time: I am trying to write a web application for the staff at my office to play a form of virtual Super14. Its a bit like any of the
2009 Jan 08
5
There is already an object named 'schema_migrations' in the database
I''ve created a table in a SQL Server database using a migration, successfully. I''ve tried to change the name of a column in the table and got the error message above when running ''rake db:migrate''. Previously I have developed using MySQL and Sqlite and migrations have worked successfully. This is an error I have not seen before. Has anybody seen this and worked