While I'm not currently using the whole rails environment, I may utilize
the framework in the future. In the meantime, I'm not clear on the
syntax for establishing a foreign key relationship for an active record
association using "t.references" or "t.belongs_to":
thufir@ARRAKIS:~/projects/rss2mysql$
thufir@ARRAKIS:~/projects/rss2mysql$ rake migrate
(in /home/thufir/projects/rss2mysql)
== CreateSubscribers: migrating
1) Upgrade to a later version of Rails. You don't say what version
you are using, but the convention of migrations named NNNN_some_name
changed to YYYYMMDDHHMMSS_some_name about a year(ish) ago when I first
started learning about Rails.
2) I wonder if you have a pluralization problem and if yuo should
change your CreateSubscriptions class to use
t.references subscriber
instead of
t.references subscribers. In general, I have learned that a
"thing" model "has_many :somethings" (note the plural) while the
Something model would "belongs_to :thing" (note the singular).
3) I also wonder why you commented out the creation of the primary key
for your Subscriptions table, although that is not likely to be your
problem.
While I'm not currently using the whole rails environment, I may
utilize the framework in the future.
[...]
1) Upgrade to a later version of Rails.
I may use the framework at a later point, but for now am just using
Active Record.
2) I wonder if you have a pluralization problem and if yuo should change
your CreateSubscriptions class to use
t.references subscriber
instead of
t.references subscribers. In general, I have learned that a
"thing" model "has_many :somethings" (note the plural) while the
Something model would "belongs_to :thing" (note the singular).
Yes, I seem to be having this problem, but I *seem* to have worked it out
(see seperate post).
3) I also wonder why you commented out the creation of the primary key
for your Subscriptions table, although that is not likely to be your
problem.
Oh, only because rather than create it manually, I wanted to use this
"references" feature.