Skip to content

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.

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

3 participants