Sponsored Content
The Lounge What is on Your Mind? VBulletin 3.8 to Discourse on Docker Migration Test Take Four Post 303045267 by Neo on Sunday 15th of March 2020 03:07:01 AM
Old 03-15-2020
VBulletin 3.8 to Discourse on Docker Migration Test Take Four

Test Build 4 on New Server, with changes identified in discourse test builds 2 and 3, primarily:
  • Insuring ruby-bbcode-to-markdown is enabled.
  • Removing line breaks from ICODE to markdown in migration script.
  • Added vbpostid to posts in discourse to setup migrating vb "thanks" to discourse "likes" (not sure if this part will work or not, first time test for this migration feature.)

Chuggin' along again, from total scratch on a new server (and with fingers crossed):

Code:
root@discourse1-app:/var/www/discourse# su discourse -c 'bundle exec ruby script/import_scripts/vbulletin_neo4.rb'
discourse:@localhost wants vb3
Loading existing groups...
Loading existing users...
Loading existing categories...
Loading existing posts...
Loading existing topics...

importing groups..
       20 / 20 (100.0%)  [173261 items/min]   
importing users
     4774 / 138160 (  3.5%)  [182 items/min]

Looks like the "user part" of the migration will take about 12 hours Smilie

Entry in discourse posts table, to set up "thanks" to "likes" migration:

Code:
 vbpostid                | integer                     |           |          |

Let's see if this new vbulletin_neo4.rb code works on the first attempt (if it does, that would be a pleasant surprise).

Note: Will not be migrating private messages (PMs) from vb to discourse in this test run and probably not in the final migration either.
 

7 More Discussions You Might Find Interesting

1. Web Development

Removing VBSEO for vbulletin – Reverting back to vbulletin URLs

Please note, this information was copied from vbseo.com, now showing a database error. This is posted for reference since vbSEO seems to be going out of business: If you ever need to uninstall vBSEO , you can use the following instructions. Make sure you carefully follow each step. Login... (37 Replies)
Discussion started by: Neo
37 Replies

2. Linux

Docker and pipework,ip with other subnet

Recently i found this for give to docker a "personal" ip ip addr del 10.1.1.133/24 dev eth0 ip link add link eth0 dev eth0m type macvlan mode bridge ip link set eth0m up ip addr add 10.1.1.133/24 dev eth0m route add default gw 10.1.1.1On container i did ... (0 Replies)
Discussion started by: Linusolaradm1
0 Replies

3. AIX

AIX - FC Switch migration, SAN Migration question!

I'm New to AIX / VIOS We're doing a FC switch cutover on an ibm device, connected via SAN. How do I tell if one path to my remote disk is lost? (aix lvm) How do I tell when my link is down on my HBA port? Appreciate your help, very much! (4 Replies)
Discussion started by: BG_JrAdmin
4 Replies

4. Shell Programming and Scripting

Problem in extracting yocto SDK for docker

Actually I was facing the following issue while building my Yocto SDK on Docker container sudo docker build --tag="akash/eclipse-che:6.5.0-1" --tag="akash/eclipse-che:latest" /home/akash/dockerimage.yocto.support/ Sending build context to Docker daemon 26.93MB Step 1/5 : FROM eclipse/cpp_gcc ... (3 Replies)
Discussion started by: Akash BHardwaj
3 Replies

5. Docker

Docker learning Phase-I

Hello All, I had recently learnt a bit of Docker(which provides containerization process). Here are some of my learning points from it. Let us start first with very basic question: What is Docker: Docker is a platform for sysadmins and developers to DEPLOY, DEVELOP and RUN applications ... (7 Replies)
Discussion started by: RavinderSingh13
7 Replies

6. What is on Your Mind?

VBulletin 3.8 to Discourse on Docker Migration Test Take Two

OK. Like we all do, we learn a lot from tests, test migrations, and so forth. Today, I started from scratch on test migration 2, armed with a lot more knowledge, The main differences are as follows: Installed discourse plugin ruby-bbcode-to-md before starting the install Modified... (30 Replies)
Discussion started by: Neo
30 Replies

7. What is on Your Mind?

Under Consideration: Migrate the Forums to Discourse

Dear All, After being active on the Node-RED forum for the last few weeks, I have been very impressed with Discourse, and my eyes have been opened. https://www.discourse.org/ but not the paid /hosted offering, but using the open distribution: https://github.com/discourse/discourse ... (52 Replies)
Discussion started by: Neo
52 Replies
Jifty::Manual::Upgrading(3pm)				User Contributed Perl Documentation			     Jifty::Manual::Upgrading(3pm)

NAME
Jifty::Manual::Upgrading - How-to change your application database over time DESCRIPTION Jifty provides a way for you to upgrade the database schema and data of your application between versions. If all you are doing is adding new models or columns to existing models Jifty will do the upgrade almost automatically. If more extensive changes are required you need to write some code to tell Jifty what to do. TERMINOLOGY
Be sure you know the following terms before reading this document: o "schema" in Jifty::Manual::Glossary o "schema version" in Jifty::Manual::Glossary o "database version" in Jifty::Manual::Glossary HOW TO
General Instructions For all of these actions, the the database version stored in your Jifty configuration is significant. See the value stored in etc/config.yml at: framework: Database: Version: 0.0.1 Make all your code changes using the version number you are going to use. Once you have finished updating your code and are ready to test, bump the version stored in etc/config.yml to match the new version you are going to use. If you are writing tests as you go (shame on you if you aren't!), you should be able to run: perl Makefile.PL make make test to test the latest version and check for problems. Once you are sure you've worked out the kinds, you may perform the actual upgrade by running: bin/jifty schema --setup This will take care of the work of adding any new columns and models, dropping old columns, and running any upgrade scripts you have scheduled. Basic column and model operations Adding a new model Create your model just as you normally would: bin/jifty model --name MyModel Then, you need to tell Jifty at which version of your application the model was created. To do this add a since sub to your new model class. sub since { '0.0.5' } Adding a new column to an existing model When you have an existing model and decide that you need to add another column to it you also need to tell Jifty about this. This is done by using "since" as well. However, the "since" goes into the column definition itself. column created_by => refers_to Wifty::Model::User, since '0.0.20'; Dropping a column from a model CAUTION: Be aware that all the data that was stored in this column will be destroyed at upgrade if you follow this procedure. If you no longer need a particular column in your model, you can have it dropped by setting the "till" property on your column definition. column extra_info type is 'text', label is 'Extra info', till '0.0.13'; The version you use for "till" is the version the drop is effective. In the example above, the "extra_info" column will be available in version 0.0.12, but not in version 0.0.13. This column will be dropped from the schema at the next upgrade, which will destroy all data stored in that column. TODO Dropping a model Data migration and schema changes If a file called Upgrade.pm exists in your application it will be run by "jifty schema --setup". Upgrade.pm can be used to make any schema changes or to manipulate your applications data. At the very least your Upgrade.pm should contain the following: package MyApp::Upgrade; use base qw(Jifty::Upgrade); use Jifty::Upgrade qw( since rename ); since '0.6.1' => sub { .... }; The "since" function is where you do all the work. Each "since" will be run in version order until the application is up to date. Renaming a column To rename a column, you need to make sure that your schema and upgrade script both cooperate in the process. Your schema will record changes to your model API and the upgrade script will tell Jifty about the rename. The old column name needs to marked with "till" to notify Jifty that the column name no longer exists. The new column name needs to marked with "since" to notify Jifty that a column by the new name exists. Here we are renaming "zip" to "postcode": column zip => type is 'text', label is 'ZIP code', till '0.6.1'; column postcode => type is 'text', label is 'Postal code', since '0.6.1'; Notice that both "since" and "till" have the same version number set. This is the version number the change will take place. Before you upgrade, though, you must tell Jifty that a rename is happening here, which is done in your upgrade script: use MyApp::Upgrade; use base qw(Jifty::Upgrade); use Jifty::Upgrade qw( since rename ); since '0.6.1' => sub { rename( table => 'MyApp::Model::User', column => 'zip', to => 'postcode' ); }; Migrating data You can perform any action you want inside the "since" blocks of your upgrade script. In the case of data migration, you might want to convert your data from one form to another. For example, let's say our users always gave us "first_name" and "last_name" before, but we've added a new column "display_name" which will normally contain their name in "last, first" format, but could be customized per-account. We want to go ahead and initialize this new column during the upgrade. In your upgrade script, you could add: since '0.2.4' => sub { my $users = MyApp::Model::UserCollection->new( current_user => Jifty->app_class('CurrentUser')->superuser ); $users->unlimit; while (my $user = $users->next) { # error checks may save you from hours of debugging my ($status, $msg) = $user->set_display_name( join(', ', $user->last_name, $user->first_name) ); Jifty->log->error("Couldn't change user record: $msg") unless $status; } }; Note that collection created using super user to pass ACL checks and other restrictions, if your models are protected from super user then you may have problems. See also Jifty::Manual::AccessControl. SEE ALSO
Jifty::Upgrade, Jifty::Script::Schema, Jifty::Manual::Models, Jifty::Manual::Tutorial, Jifty::Manual::Glossary perl v5.14.2 2010-09-25 Jifty::Manual::Upgrading(3pm)
All times are GMT -4. The time now is 10:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy