1 |
diff -up smeserver-user-webspace-0.1/root/etc/e-smith/db/configuration/migrate/50userwebspace.migratesme7 smeserver-user-webspace-0.1/root/etc/e-smith/db/configuration/migrate/50userwebspace |
2 |
--- smeserver-user-webspace-0.1/root/etc/e-smith/db/configuration/migrate/50userwebspace.migratesme7 2013-12-11 16:33:24.000000000 -0500 |
3 |
+++ smeserver-user-webspace-0.1/root/etc/e-smith/db/configuration/migrate/50userwebspace 2013-12-11 16:33:11.000000000 -0500 |
4 |
@@ -0,0 +1,11 @@ |
5 |
+{ |
6 |
+# this is top cleanly migrate old db entry from sme7 and previous version (type = no|yes) |
7 |
+my $UserPublicWeb = $DB->get('UserPublicWeb') || $DB->new_record('UserPublicWeb', {type => 'service'}); |
8 |
+ |
9 |
+if ($UserPublicWeb->prop('type') ne 'service') |
10 |
+ { |
11 |
+ my $status = ($UserPublicWeb->prop('type') eq 'off')?'disabled':'enabled'; |
12 |
+ $UserPublicWeb->set_prop('type','service'); |
13 |
+ $UserPublicWeb->set_prop('status',$status); |
14 |
+ } |
15 |
+} |