yorubaname-website
yorubaname-website copied to clipboard
Feature/embedded videos
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.
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;