putypuruty

Topic: Guide for upgrading a production database from 1.8 to 1.9

Before proceeding, please back up your 1.8 database!

1. open phpmyadmin and select your Jobberbase 1.8 database
2. run the following code

Code:

ALTER TABLE `jobs` MODIFY COLUMN `spotlight` TINYINT(4) NOT NULL;

ALTER TABLE `settings` ADD COLUMN `ordering` INTEGER UNSIGNED NOT NULL AFTER `value`;

set @ordering := 0;
update settings set ordering = @ordering := @ordering + 1 where category_id = 1;

set @ordering := 0;
update settings set ordering = @ordering := @ordering + 1 where category_id = 2;

set @ordering := 0;
update settings set ordering = @ordering := @ordering + 1 where category_id = 3;

set @ordering := 0;
update settings set ordering = @ordering := @ordering + 1 where category_id = 4;

set @ordering := 0;
update settings set ordering = @ordering := @ordering + 1 where category_id = 5;

INSERT INTO `settings` (`id`,`category_id`,`name`,`title`,`description`,`data_type`,`input_type`,`input_options`,`validation`,`value`,`ordering`) VALUES  
 (40,4,'report_post_after','Report Post Delay','No of Minutes after which a user is allowed to report same post after the previous report.',NULL,NULL,NULL,'not_empty|is_number','10',7),
 (41,4,'post_notify_on','When to send Mail?','Send mail only after this number of reports on a post.','integer',NULL,NULL,'not_empty','2',8),
 (42,4,'captcha_enable_on_post_page','Enable ReCaptcha on post page','Enable spam protection on the post a job page.','boolean','radiobutton','no|yes',NULL,'0',4),
 (43,4,'captcha_enable_on_apply_page','Enable ReCaptcha on apply page','Enable spam protection on the apply to a job page.','boolean','radiobutton','no|yes',NULL,'1',5),
 (44,4,'captcha_enable_on_contact_page','Enable ReCaptcha on contact page','Enable spam protection on the contact page.','boolean','radiobutton','no|yes',NULL,'0',6),
 (45,1,'enable_new_post_moderation','Enable Job Moderation','If enabled, the administrator must always activate the very first job posted by a hiring person/company. From there on, every job posted with the same email address will be automatically activated.','boolean','radiobutton','no|yes',NULL,'1',17);

update settings set name = 'sidebar_only_cities_with_at_least_number_of_jobs', title = 'Sidebar - only cities with at least X jobs', description = 'If the sidebar is configured to show cities, then only show cities that have at least the specified number of jobs available.', data_type = 'integer', input_type = NULL, input_options = NULL where name = "sidebar_only_cities_with_jobs";

Please let us know if something is not clear and we will try to update this guide.

mneylon

Re: Guide for upgrading a production database from 1.8 to 1.9

Thanks for sharing this

Do you have any guidelines / tips for upgrading the actual site from 1.8 to 1.9? ie. which files can be overwritten, which ones can't etc