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

Feature/embedded videos #92

Closed
wants to merge 11 commits into from

Conversation

Zifah
Copy link
Contributor

@Zifah Zifah commented Feb 17, 2020

Enabled the addition of YouTube video links to a name entry by adding a new entity list property to AbstractNameEntry. Also enabled the website (front-end) to display any number of videos as embedded videos on the single name entry page.

image

The videos (caption and URL) are stored on a separate table on the database and this means that if as expected on production, Hibernate is set to not automatically update the schema, SQL scripts will have to be run to create the two new tables before this feature is deployed to production. Otherwise, the application startup will fail during database initialization as those tables would be reported missing.

The scripts to create the new tables are provided below:

duplicate_name_entry_videos

CREATE TABLE `duplicate_name_entry_videos` (
  `duplicate_name_entry_id` bigint(20) NOT NULL,
  `caption` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  KEY `FK_jmt56lrw0vg0j3tf0j4w342tn` (`duplicate_name_entry_id`),
  CONSTRAINT `FK_jmt56lrw0vg0j3tf0j4w342tn` FOREIGN KEY (`duplicate_name_entry_id`) REFERENCES `duplicate_entry` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

name_entry_videos

CREATE TABLE `name_entry_videos` (
  `name_entry_id` bigint(20) NOT NULL,
  `caption` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  KEY `FK_ca3hi0em3108r0v2xmpvdbl9k` (`name_entry_id`),
  CONSTRAINT `FK_ca3hi0em3108r0v2xmpvdbl9k` FOREIGN KEY (`name_entry_id`) REFERENCES `name_entry` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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.

1 participant