

CREATE TABLE `was_hub_milestone` (
  `milestone_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `business_type_id` tinyint(1) NOT NULL DEFAULT '1',
  `slug` varchar(64) NOT NULL,
  `title` varchar(64) NOT NULL,
  `description` text NOT NULL,
  `insert_timestamp` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `update_timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`milestone_id`)
) ENGINE=InnoDB COMMENT='stores hub milestone tasks';

CREATE TRIGGER `was_hub_milestone_insert_timestamp` BEFORE INSERT ON `was_hub_milestone`
FOR EACH ROW SET NEW.insert_timestamp = NOW();


CREATE TABLE `was_hub_milestone_hub` (
  `milestone_hub_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `business_id` int(11) unsigned NOT NULL,
  `milestone_id` int(11) unsigned NOT NULL,
  `checked` tinyint(1) NOT NULL DEFAULT '1',
  `insert_timestamp` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `update_timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`milestone_hub_id`),
  KEY `idx_business_milestone` (`business_id`, `milestone_id`)
) ENGINE=InnoDB COMMENT='stores milestone tasks related to the hub';

CREATE TRIGGER `was_hub_milestone_hub_insert_timestamp` BEFORE INSERT ON `was_hub_milestone_hub`
FOR EACH ROW SET NEW.insert_timestamp = NOW();


INSERT INTO `was_hub_milestone` (`business_type_id`, `slug`, `title`, `description`)
VALUES
(1, 'choose_niche', 'Choose Niche', 'Choose a niche that you want to build your business around.'),
(1, 'create_brand', 'Create Website Name/Brand', 'Create a Website Name/Brand for your business.'),
(1, 'build_website', 'Build Your Website', 'Build your initial  website for your business.'),
(1, 'training_intro', 'Training Intro', 'View Class 1 and Learn how to use the platform and get started with your business. <a href="https://my.wealthyaffiliate.com/classes/series/laying-the-groundwork-for-your-business/first-steps-with-my-new-business" target="_blank">View Class 1 Here</a>'),
(1, 'about_me', 'About Me', 'Create an about me page for your website. <a href="https://my.wealthyaffiliate.com/classes/series/laying-the-groundwork-for-your-business/crafting-your-first-website-pages" target="_blank">Learn how in Class 3 here</a>'),
(1, 'privacy_policy', 'Privacy Policy', 'Create a privacy policy for your website. <a href="https://my.wealthyaffiliate.com/classes/series/laying-the-groundwork-for-your-business/crafting-your-first-website-pages" target="_blank">Learn how in Class 3 here</a>'),
(1, 'register_domain', 'Register Domain', 'Register a domain for your website and GO LIVE with Your Online Business. <a href="https://my.wealthyaffiliate.com/classes/series/laying-the-groundwork-for-your-business/launching-your-own-unique-brand" target="_blank">Learn how in Class 2 Here</a>'),
(1, 'add_logo', 'Add Logo', 'Add a logo to your website. <a href="https://my.wealthyaffiliate.com/classes/series/laying-the-groundwork-for-your-business/creating-a-professional-logo" target="_blank">Learn how in Class 4 here</a>'),
(1, 'setup_seo_framework', 'Set-Up SEO Framework', 'You are going to set your website up for proper "meta" data, this means adding a title and description to your website through "The SEO Framework" plugin. This will lead to your website getting indexed and ranked more efficiently in search engines. <a href="https://my.wealthyaffiliate.com/classes/series/growth-building-rankings-and-momentum-in-your-business/getting-your-website-set-up-for-seo" target="_blank">Learn how in Series 2: Class 1</a>'),
(1, 'setup_google_site_kit', 'Set-Up Google Site Kit', 'Install and Set-up the Google Site Kit Plugin.  The Google Site Kit allows you to efficiently set-up Google Search Console, Analytics and Adsense. This is going to allow you to see search ranking and traffic data right within Wordpress, and down the road, you will be able to add Adsense to your website and earn money. <a href="https://my.wealthyaffiliate.com/classes/series/growth-building-rankings-and-momentum-in-your-business/the-rules-of-seo-making-search-engines-love-your-site" target="_blank">Learn how in Series 2: Class 2</a>'),
(1, 'first_niche_article', '1st Niche Article', 'Write your first niche article for your website. <a href="https://my.wealthyaffiliate.com/classes/series/laying-the-groundwork-for-your-business/creating-helpful-content-that-ranks" target="_blank">Learn how in Class 6 here</a>'),
(1, 'setup_wa_profile', 'Set up WA Profile', 'Set up your profile on Wealthy Affiliate to maximize your network reach, help, and support. <a href="https://my.wealthyaffiliate.com/myprofile" target="_blank">Do this on your profile here</a>'),
(1, 'join_live_chat', 'Join Live Chat', 'Join the live chat and introduce yourself on the <a href="https://my.wealthyaffiliate.com/home" target="_blank">Activity Dashboard</a>. Build relationships and extend your network to gain faster help and more support by expert members.'),
(1, 'first_review_page', '1st Review Page', 'Create your first Product Review Page. This could be any product/service in your niche, but ideally one that you are going to be promoting on your website.'),
(1, 'join_your_first_affiliate_program', 'Join Your First Affiliate Program', 'At this point, you can join an affiliate program, but do know that there are certain affiliate programs that have an approval process for their programs.  You can join programs like Clickbank.com that don\'t have a review process, but you can also search and find others.  Join at least ONE affiliate program at this step.'),
(1, 'add_affiliate_disclosure_page', 'Add Affiliate Disclosure Page', 'Add an affiliate disclosure page to your website from the Hubs Template.'),
(1, 'affiliate_links', 'Affiliate Links', 'Add affiliate links to your posts.'),
(1, 'join_facebook', 'Join Facebook', 'Create a Facebook.com account.'),
(1, 'create_facebook_page', 'Create a Facebook Page', 'From within your Facebook.com account, you will be able to create a business page for your website.  You will be posting ALL new pages/posts to your business page.'),
(1, 'first_facebook_page_post', '1st Facebook Page Post', 'Create a post on your Facebook Page that links to one of the posts on your website.'),
(1, 'join_x_com', 'Join X.com', 'Create an X.com account (formerly Twitter).'),
(1, 'first_x_com_post', '1st X.com Post', 'Create a post on X.com that links to one of the posts on your website.'),
(1, 'join_pinterest', 'Join Pinterest', 'Create a Pinterest account.'),
(1, 'first_pinterest_post', '1st Pinterest Post', 'Create a post on Pinterest that links to one of the posts on your website.'),
(1, '7x_posts', '7x Posts', 'Complete 7 published posts for your website following the strategies in the core training.'),
(1, 'first_website_comment', 'First Website Comment', 'Get your first comment on your website using the SiteComments platform.'),
(1, 'create_domain_specific_email_address', 'Create a Domain Specific Email Address', 'Create a domain specific email address for your website.<br><a href="https://my.wealthyaffiliate.com/kyle/blog/creating-domain-specific-email-accounts-at-wealthy-affiliate" target="_blank">https://my.wealthyaffiliate.com/kyle/blog/creating-domain-specific-email-accounts-at-wealthy-affiliate</a>'),
(1, 'create_gravatar', 'Create a Gravatar', 'Go to Gravatar.com and connect an email address to an image.  This will allow you to have an image associated with a particular email address in Wordpress comments.'),
(1, 'create_new_website_user', 'Create a New Website User', 'Create a new user in Wordpress.  Publishing content as a particular user (instead of admin) will create trust, and this is an important step as you build out your website and you will want to assign all of your content to these users.<br><a href="https://my.wealthyaffiliate.com/kyle/blog/how-to-create-a-new-user-in-wordpress" target="_blank">https://my.wealthyaffiliate.com/kyle/blog/how-to-create-a-new-user-in-wordpress</a>'),
(1, 'add_featured_images_to_all_posts', 'Add Featured Images to ALL Posts', 'Add featured images to all of your posts.  If you are using a theme that duplicates featured images, then you will need to add the "additional CSS" to remove that (as instructed in the video).<br><a href="https://my.wealthyaffiliate.com/kyle/blog/adding-featured-images-to-your-website-and-avoiding-duplication" target="_blank">https://my.wealthyaffiliate.com/kyle/blog/adding-featured-images-to-your-website-and-avoiding-duplication</a>'),
(1, '15x_posts', '15x Posts', 'Publish 15 posts on your website.'),
(1, 'join_application_based_program', 'Join Application-Based Program', 'At this stage, you can start applying for more affiliate programs.  Many affiliate programs have application processes and require a base of 15 posts on your website.  Since you have done this, you can now apply and get accepted to relevant affiliate programs at a much higher rate.  This includes programs within Awin.com, ShareASale.com, CJ.com, Impact.com and Rakuten.com.'),
(1, 'explore_appearance_themes_of_your_website', 'Explore Appearance Themes of Your Website (Optional)', 'This is an optional step, but if you want to change your theme design it is a good idea to do this before you have too much content on your website. <a href="https://my.wealthyaffiliate.com/kyle/blog/how-to-change-your-theme-design-in-wordpress" target="_blank">Learn how to change your theme here</a>'),
(1, '25x_posts', '25x Posts', 'Publish 25 posts on your website.'),
(1, 'add_youtube_video_to_your_website', 'Add a Youtube Video to Your Website', 'Add a Youtube video to one of your posts or pages on your website.<br><a href="https://my.wealthyaffiliate.com/kyle/blog/how-to-embed-a-youtube-video-into-your-website" target="_blank">https://my.wealthyaffiliate.com/kyle/blog/how-to-embed-a-youtube-video-into-your-website</a>'),
(1, 'apply_for_google_adsense', 'Apply for Google Adsense', 'Apply for Google Adsense.  When you have Google Adsense approved, you can start adding ads to your website and get paid for "clicks" that those ads generate.  Adsense typically requires at least 25 published posts on your website before you get approved. <a href="https://support.google.com/adsense/answer/10162?hl=en" target="_blank">You can apply to Adsense here</a>'),
(1, '50x_posts', '50x Posts', 'Publish 50 posts on your website.'),
(1, 'create_new_categories_in_hubs', 'Create New Categories in Hubs', 'Add 5 new categories in hubs.  As you publish more content on your website, you will want to build out new categories within your Hub.  This will allow you to continue to explore different facets of your niche and open up new opportunities.<br><a href="https://my.wealthyaffiliate.com/kyle/blog/how-to-create-a-new-category-in-hubs" target="_blank">https://my.wealthyaffiliate.com/kyle/blog/how-to-create-a-new-category-in-hubs</a>'),
(1, '100x_posts', '100x Posts', 'Publish 100 posts on your website.'),
(2, 'choose_to_promote_wa', 'Choose to Promote WA (Default Done)', 'Choose a niche that you want to build your business around.'),
(2, 'create_brand', 'Create Website Name/Brand (Default Done)', 'Create a Website Name/Brand for your business.'),
(2, 'build_website', 'Build Your Website (Default Done)', 'Build your initial website for your business.'),
(2, 'training_intro', 'Training Intro', 'View Class 1 and Learn how to use the platform and get started with your business. <a href="https://my.wealthyaffiliate.com/classes/series/laying-the-groundwork-for-your-business/first-steps-with-my-new-business" target="_blank">View Class 1 Here</a>'),
(2, 'about_me', 'About Me', 'Create an about me page for your website. <a href="https://my.wealthyaffiliate.com/classes/series/laying-the-groundwork-for-your-business/crafting-your-first-website-pages" target="_blank">Learn how in Class 3 here</a>'),
(2, 'privacy_policy', 'Privacy Policy', 'Create a privacy policy for your website. <a href="https://my.wealthyaffiliate.com/classes/series/laying-the-groundwork-for-your-business/crafting-your-first-website-pages" target="_blank">Learn how in Class 3 here</a>'),
(2, 'register_domain', 'Register Domain', 'Register a domain for your website and GO LIVE with Your Online Business. <a href="https://my.wealthyaffiliate.com/classes/series/laying-the-groundwork-for-your-business/launching-your-own-unique-brand" target="_blank">Learn how in Class 2 Here</a>'),
(2, 'add_logo', 'Add Logo', 'Add a logo to your website. <a href="https://my.wealthyaffiliate.com/classes/series/laying-the-groundwork-for-your-business/creating-a-professional-logo" target="_blank">Learn how in Class 4 here</a>'),
(2, 'publish_wa_review', 'Publish WA Review', 'Create and Publish a Wealthy Affiliates review. <a href="https://my.wealthyaffiliate.com/classes/series/laying-the-groundwork-for-your-bootcamp-business/creating-a-high-quality-wa-review" target="_blank">Learn how it Class 7 here</a>'),
(2, 'setup_seo_framework', 'Set-Up SEO Framework', 'You are going to set your website up for proper "meta" data, this means adding a title and description to your website through "The SEO Framework" plugin. This will lead to your website getting indexed and ranked more efficiently in search engines. <a href="https://my.wealthyaffiliate.com/classes/series/growth-building-rankings-and-momentum-in-your-business/getting-your-website-set-up-for-seo" target="_blank">Learn how in Series 2: Class 1</a>'),
(2, 'setup_google_site_kit', 'Set-Up Google Site Kit', 'Install and Set-up the Google Site Kit Plugin.  The Google Site Kit allows you to efficiently set-up Google Search Console, Analytics and Adsense. This is going to allow you to see search ranking and traffic data right within Wordpress, and down the road, you will be able to add Adsense to your website and earn money. <a href="https://my.wealthyaffiliate.com/classes/series/growth-building-rankings-and-momentum-in-your-business/the-rules-of-seo-making-search-engines-love-your-site" target="_blank">Learn how in Series 2: Class 2</a>'),
(2, 'first_niche_article', '1st Niche Article', 'Write your first niche article for your website. <a href="https://my.wealthyaffiliate.com/classes/series/laying-the-groundwork-for-your-business/creating-helpful-content-that-ranks" target="_blank">Learn how in Class 6 here</a>'),
(2, 'setup_wa_profile', 'Set up WA Profile', 'Set up your profile on Wealthy Affiliate to maximize your network reach, help, and support. <a href="https://my.wealthyaffiliate.com/myprofile" target="_blank">Do this on your profile here</a>'),
(2, 'join_live_chat', 'Join Live Chat', 'Join the live chat and introduce yourself on the <a href="https://my.wealthyaffiliate.com/home" target="_blank">Activity Dashboard</a>. Build relationships and extend your network to gain faster help and more support by expert members.'),
(2, 'first_review_page', '1st Review Page', 'Create your first Product Review Page. This could be any product/service in your niche, but ideally one that you are going to be promoting on your website.'),
(2, 'add_affiliate_disclosure_page', 'Add Affiliate Disclosure Page', 'Add an affiliate disclosure page to your website from the Hubs Template.'),
(2, 'affiliate_links', 'Affiliate Links', 'Add affiliate links to your posts.'),
(2, 'join_facebook', 'Join Facebook', 'Create a Facebook.com account.'),
(2, 'create_facebook_page', 'Create a Facebook Page', 'From within your Facebook.com account, you will be able to create a business page for your website.  You will be posting ALL new pages/posts to your business page.'),
(2, 'first_facebook_page_post', '1st Facebook Page Post', 'Create a post on your Facebook Page that links to one of the posts on your website.'),
(2, 'join_x_com', 'Join X.com', 'Create an X.com account (formerly Twitter).'),
(2, 'first_x_com_post', '1st X.com Post', 'Create a post on X.com that links to one of the posts on your website.'),
(2, 'join_pinterest', 'Join Pinterest', 'Create a Pinterest account.'),
(2, 'first_pinterest_post', '1st Pinterest Post', 'Create a post on Pinterest that links to one of the posts on your website.'),
(2, '7x_posts', '7x Posts', 'Complete 7 published posts for your website following the strategies in the core training.'),
(2, 'first_website_comment', 'First Website Comment', 'Get your first comment on your website using the SiteComments platform.'),
(2, 'create_domain_specific_email_address', 'Create a Domain Specific Email Address', 'Create a domain specific email address for your website.<br><a href="https://my.wealthyaffiliate.com/kyle/blog/creating-domain-specific-email-accounts-at-wealthy-affiliate" target="_blank">https://my.wealthyaffiliate.com/kyle/blog/creating-domain-specific-email-accounts-at-wealthy-affiliate</a>'),
(2, 'create_gravatar', 'Create a Gravatar', 'Go to Gravatar.com and connect an email address to an image.  This will allow you to have an image associated with a particular email address in Wordpress comments.'),
(2, 'create_new_website_user', 'Create a New Website User', 'Create a new user in Wordpress.  Publishing content as a particular user (instead of admin) will create trust, and this is an important step as you build out your website and you will want to assign all of your content to these users.<br><a href="https://my.wealthyaffiliate.com/kyle/blog/how-to-create-a-new-user-in-wordpress" target="_blank">https://my.wealthyaffiliate.com/kyle/blog/how-to-create-a-new-user-in-wordpress</a>'),
(2, 'add_featured_images_to_all_posts', 'Add Featured Images to ALL Posts', 'Add featured images to all of your posts.  If you are using a theme that duplicates featured images, then you will need to add the "additional CSS" to remove that (as instructed in the video).<br><a href="https://my.wealthyaffiliate.com/kyle/blog/adding-featured-images-to-your-website-and-avoiding-duplication" target="_blank">https://my.wealthyaffiliate.com/kyle/blog/adding-featured-images-to-your-website-and-avoiding-duplication</a>'),
(2, '15x_posts', '15x Posts', 'Publish 15 posts on your website.'),
(2, 'join_application_based_program', 'Join Application-Based Program', 'At this stage, you can start applying for more affiliate programs.  Many affiliate programs have application processes and require a base of 15 posts on your website.  Since you have done this, you can now apply and get accepted to relevant affiliate programs at a much higher rate.  This includes programs within Awin.com, ShareASale.com, CJ.com, Impact.com and Rakuten.com.'),
(2, 'explore_appearance_themes_of_your_website', 'Explore Appearance Themes of Your Website (Optional)', 'This is an optional step, but if you want to change your theme design it is a good idea to do this before you have too much content on your website. <a href="https://my.wealthyaffiliate.com/kyle/blog/how-to-change-your-theme-design-in-wordpress" target="_blank">Learn how to change your theme here</a>'),
(2, '25x_posts', '25x Posts', 'Publish 25 posts on your website.'),
(2, 'add_youtube_video_to_your_website', 'Add a Youtube Video to Your Website', 'Add a Youtube video to one of your posts or pages on your website.<br><a href="https://my.wealthyaffiliate.com/kyle/blog/how-to-embed-a-youtube-video-into-your-website" target="_blank">https://my.wealthyaffiliate.com/kyle/blog/how-to-embed-a-youtube-video-into-your-website</a>'),
(2, 'apply_for_google_adsense', 'Apply for Google Adsense', 'Apply for Google Adsense.  When you have Google Adsense approved, you can start adding ads to your website and get paid for "clicks" that those ads generate.  Adsense typically requires at least 25 published posts on your website before you get approved. <a href="https://support.google.com/adsense/answer/10162?hl=en" target="_blank">You can apply to Adsense here</a>'),
(2, '50x_posts', '50x Posts', 'Publish 50 posts on your website.'),
(2, 'create_new_categories_in_hubs', 'Create New Categories in Hubs', 'Add 5 new categories in hubs.  As you publish more content on your website, you will want to build out new categories within your Hub.  This will allow you to continue to explore different facets of your niche and open up new opportunities.<br><a href="https://my.wealthyaffiliate.com/kyle/blog/how-to-create-a-new-category-in-hubs" target="_blank">https://my.wealthyaffiliate.com/kyle/blog/how-to-create-a-new-category-in-hubs</a>'),
(2, '100x_posts', '100x Posts', 'Publish 100 posts on your website.');
