-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
podcast categories #1060
base: master
Are you sure you want to change the base?
podcast categories #1060
Conversation
alter table uryplayer.podcast_category | ||
add constraint podcast_category_pk | ||
primary key (podcast_category_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be done in the create table
(podcast_category_id SERIAL NOT NULL PRIMARY KEY
create unique index podcast_category_podcast_category_id_uindex | ||
on uryplayer.podcast_category (podcast_category_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: redundant if it's already a primary key
insert into uryplayer.podcast_category (category_name) values ('URY Podcast'), ('Music Team Interview'); | ||
|
||
alter table uryplayer.podcast | ||
add category_id int; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be add category_id int references uryplayer.podcast_category (podcast_category_id)
? Saves an extra ALTER.
@@ -485,7 +512,8 @@ public static function create( | |||
$tags, | |||
$file, | |||
MyRadio_Show $show = null, | |||
$credits = null | |||
$credits = null, | |||
$category_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might need to be before the optional parameters ($show
and friends)
won't lie - not tested
closes: #1057