Created
August 22, 2009 22:13
-
-
Save jenglert/173014 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Custom SQL | |
execute "create or replace view vw_feed_parse_stats as (select feed_id, dayofyear(parse_start) dayofyear, feed_items_added from feed_parse_logs group by dayofyear(parse_start), feed_id);" | |
execute "alter table feed_item_categories add constraint category_fk foreign key (category_id) references categories(id);" | |
change_column :feed_item_categories, :feed_item_id, :integer | |
execute "alter table feed_item_categories add constraint feed_item_fk foreign key (feed_item_id) references feed_items(id);" | |
execute "alter table feed_items add constraint feed_fk foreign key (feed_id) references feeds(id);" | |
execute "alter table feed_parse_logs add constraint fpl_feed_fk foreign key (feed_id) references feeds(id);" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment