Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

michael-grace
Copy link
Member

won't lie - not tested

closes: #1057

Comment on lines +13 to +15
alter table uryplayer.podcast_category
add constraint podcast_category_pk
primary key (podcast_category_id);
Copy link
Member

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

Comment on lines +10 to +11
create unique index podcast_category_podcast_category_id_uindex
on uryplayer.podcast_category (podcast_category_id);
Copy link
Member

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;
Copy link
Member

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
Copy link
Member

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Interviews
2 participants