Note that the original schema was given in SQL on the FeedTools site, and it is a
similar schema translated into a Rails migration. However, because the feed_data column
contains too much data to be stored in a regular TEXT column, you use an ALTER TABLE ...
CHANGE COLUMN statement to change the feed_data column to a MEDIUMTEXT type. (If Rails
supported MEDIUMTEXT columns out of the box, you could have initially created it as a
MEDIUMTEXT column.)
nTip You could create this database using Rails migrations as well, but in this case I??™ve included it in this
script. This is a simple way to create a database using Active Record, and it??™s independent of any Rails application,
which means that you could use this loader and then make reports on the data from any reporting
application. For example, if you did not have a Rails application and the developers in different departments
of your company wrote the code to display the data as a Perl script, a Python program, an ASP.NET web
application, a Crystal Reports report, or even a Microsoft Excel macro, they could still use this loader script.
Pages:
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321