Different databases - moving member info from Old DB to New DB

Different databases - moving member info from Old DB to New DB

Old website DB has 300 members,

New website DB is a for a different website script, and a different DB layout,

Can I transfer the member login info, username, password, email, form Old DB to New DB ?

Please let me know what info/data you need to see to tell me if the transfer is possible?

All help apprteciated :slight_smile:

You need to check that the rules for things that characters allowed in member’s names, max length of member’s names,etc tie up, for example take my user name here SpacePhoenix if with the old site you had two members called β€œSpacePhoenix” but with the only difference was a number on the end and the new site only allowed a maximum of 12 character long user names you’d have a problem as you’d end up with two users in the new site with the same name.

Yes, you really need to take a close look at the old table schema and the new table schema.

I’m sure β€œwork-arounds” can be found in most cases.

fields, datatypes and lengths the same? great! If not you may have to accept some data loss or plan on doing more work than you had hoped for.

Hello SpacePhoenix, and Mittineague,

thank to you both for your replies,

would it be possible to PM both of you, or either of you, and attach the 2 databases so you can see their schema?

then you can see if it possible to do?

Is there any clever database person who could look at my 2 databases and schema and show me a solution?

All help greatly appreciated :slight_smile:

I’m assuming both databases are MySQL ??

If so can you post the results of SHOW TABLES for them, just to get an idea of how complex we’re talking here.

https://dev.mysql.com/doc/refman/5.0/en/show-tables.html

Hello Mittineague,

I hope this is correct:

Show Tables Database Old:

Tables_in_242392_Old
osdate_admin
osdate_admin_permissions
osdate_adminemails
osdate_aff_referals
osdate_affiliates
osdate_articles
osdate_banners
osdate_blog_comments
osdate_blog_preferences
osdate_blog_story
osdate_blog_vote
osdate_buddy_ban_list
osdate_calendarevents
osdate_calendars
osdate_calendarwatchevents
osdate_cities
osdate_counties
osdate_countries
osdate_featured_profiles
osdate_glblsettings
osdate_import_questions_xref
osdate_imported_users
osdate_instant_message
osdate_languages
osdate_letters
osdate_log
osdate_mailbox
osdate_mails
osdate_membership
osdate_news
osdate_onlineusers
osdate_pages
osdate_payment_config
osdate_payment_modules
osdate_plugin
osdate_plugin_access
osdate_plugin_config
osdate_plugin_tables
osdate_poll_answer
osdate_poll_option
osdate_poll_question
osdate_pollips
osdate_polloptions
osdate_polls
osdate_promo
osdate_promo_used
osdate_questionoptions
osdate_questions
osdate_ratings
osdate_sections
osdate_shoutbox
osdate_states
osdate_stories
osdate_transactions
osdate_user
osdate_user_actions
osdate_user_choices
osdate_user_watched_profiles
osdate_useralbums
osdate_userpreference
osdate_userrating
osdate_usersearches
osdate_usersnaps
osdate_usertemplates
osdate_uservideos
osdate_views_winks
osdate_zips

…
Tables_in_712392_New
vld_albums
vld_audios
vld_banners
vld_banners_groups
vld_blocked
vld_blocked_countries
vld_blocked_ips
vld_blogs
vld_blogs_comments
vld_categories
vld_chats
vld_chats_blocks
vld_countries
vld_email_templates
vld_events
vld_events_comments
vld_events_data
vld_events_fields
vld_events_fields_items
vld_events_guests
vld_events_items
vld_events_pictures
vld_extensions
vld_favorites
vld_fields
vld_fields_groups
vld_fields_items
vld_fields_types
vld_files
vld_friends
vld_gifts
vld_guestbooks
vld_ip2c
vld_languages
vld_members
vld_members_conf
vld_members_data_members
vld_members_groups
vld_members_items
vld_messages
vld_messages_gifts
vld_news
vld_news_comments
vld_newsletters
vld_newsletters_templates
vld_notifications
vld_orders
vld_packages
vld_pages
vld_pages_comments
vld_pages_groups
vld_payment_gateways
vld_pictures
vld_pictures_comments
vld_polls
vld_quickmessages
vld_reports
vld_requests
vld_search_queries
vld_search_saved
vld_settings
vld_settings_groups
vld_settings_subgroups
vld_smilies
vld_templates
vld_uszipcodes
vld_videos
vld_videos_comments
vld_visitors
vld_votes

transfer data from

osdate_user

to

vld_members

CREATE TABLE osdate_user (
id int(11) NOT NULL AUTO_INCREMENT,
active tinyint(1) DEFAULT β€˜0’,
username varchar(25) NOT NULL DEFAULT β€˜β€™,
password varchar(32) NOT NULL DEFAULT β€˜β€™,
lastvisit int(11) NOT NULL DEFAULT β€˜0’,
regdate int(11) NOT NULL DEFAULT β€˜0’,
level tinyint(4) DEFAULT β€˜4’,
timezone decimal(5,2) DEFAULT β€˜0.00’,
allow_viewonline tinyint(1) DEFAULT β€˜1’,
rank int(11) DEFAULT β€˜0’,
email varchar(255) DEFAULT NULL,
country varchar(11) DEFAULT β€˜β€™,
actkey varchar(32) DEFAULT NULL,
firstname varchar(50) DEFAULT NULL,
lastname varchar(50) DEFAULT NULL,
gender char(1) NOT NULL DEFAULT β€˜M’,
lookgender char(1) DEFAULT β€˜β€™,
lookagestart int(11) DEFAULT β€˜0’,
lookageend int(11) DEFAULT β€˜0’,
address_line1 varchar(100) DEFAULT NULL,
address_line2 varchar(100) DEFAULT NULL,
state_province varchar(100) DEFAULT NULL,
county varchar(100) DEFAULT NULL,
city varchar(100) DEFAULT NULL,
zip varchar(30) DEFAULT NULL,
birth_date date NOT NULL,
lookcountry varchar(255) DEFAULT β€˜β€™,
lookstate_province varchar(100) DEFAULT NULL,
lookcounty varchar(100) DEFAULT NULL,
lookcity varchar(100) DEFAULT NULL,
lookzip varchar(100) DEFAULT NULL,
lookradius varchar(5) DEFAULT NULL,
radiustype varchar(5) DEFAULT β€˜miles’,
picture char(1) DEFAULT β€˜0’,
pictures_cnt int(4) DEFAULT β€˜0’,
videos_cnt int(4) DEFAULT β€˜0’,
about_me text,
couple_usernames varchar(255) DEFAULT NULL,
zip_latitude float DEFAULT NULL,
zip_longitude float DEFAULT NULL,
status varchar(20) NOT NULL DEFAULT β€˜approval’,
levelend int(11) DEFAULT NULL,
regIP varchar(100) DEFAULT NULL,
lastLoginIP varchar(100) DEFAULT NULL,
p_firstname varchar(50) DEFAULT NULL,
p_lastname varchar(50) DEFAULT NULL,
p_gender char(1) DEFAULT NULL,
p_birth_date date DEFAULT NULL,
PRIMARY KEY (id),
KEY username (username),
KEY email (email),
KEY fullname (firstname),
KEY city (city),
KEY zip (zip),
KEY country (country),
KEY lastvisit (lastvisit),
KEY lookgender (lookgender),
KEY state_province (state_province),
KEY lookcountry (lookcountry),
KEY lookageend (lookageend),
KEY lookagestart (lookagestart),
KEY status (status)
) ENGINE=MyISAM AUTO_INCREMENT=512 DEFAULT CHARSET=utf8 AUTO_INCREMENT=512 ;

…

CREATE TABLE vld_members (
member_id int(9) unsigned NOT NULL AUTO_INCREMENT,
group_id smallint(4) unsigned NOT NULL DEFAULT β€˜0’,
old_group_id smallint(4) unsigned NOT NULL DEFAULT β€˜0’,
type_id smallint(5) unsigned NOT NULL DEFAULT β€˜0’,
username varchar(32) NOT NULL DEFAULT β€˜β€™,
password varchar(32) NOT NULL DEFAULT β€˜β€™,
email varchar(64) NOT NULL DEFAULT β€˜β€™,
joindate int(10) unsigned NOT NULL DEFAULT β€˜0’,
lastvisit int(10) unsigned NOT NULL DEFAULT β€˜0’,
totalvisits int(6) unsigned NOT NULL DEFAULT β€˜0’,
totalalbums smallint(5) unsigned NOT NULL DEFAULT β€˜0’,
totalavideos smallint(5) unsigned NOT NULL DEFAULT β€˜0’,
totalivideos smallint(5) unsigned NOT NULL DEFAULT β€˜0’,
totalaaudio smallint(5) unsigned NOT NULL DEFAULT β€˜0’,
totaliaudio smallint(5) unsigned NOT NULL DEFAULT β€˜0’,
totalblocked smallint(5) unsigned NOT NULL DEFAULT β€˜0’,
totalfavorites smallint(5) unsigned NOT NULL DEFAULT β€˜0’,
totalafriends int(7) unsigned NOT NULL DEFAULT β€˜0’,
totalifriends smallint(5) unsigned NOT NULL DEFAULT β€˜0’,
totalvisitors smallint(5) unsigned NOT NULL DEFAULT β€˜0’,
totalaguestbooks int(7) unsigned NOT NULL DEFAULT β€˜0’,
totaliguestbooks smallint(5) unsigned NOT NULL DEFAULT β€˜0’,
totalimessages int(6) NOT NULL DEFAULT β€˜0’,
totalsmessages smallint(5) unsigned NOT NULL DEFAULT β€˜0’,
newmessages smallint(4) unsigned NOT NULL DEFAULT β€˜0’,
totaligifts int(6) unsigned NOT NULL DEFAULT β€˜0’,
totalsgifts int(6) unsigned NOT NULL DEFAULT β€˜0’,
newgifts smallint(4) unsigned NOT NULL DEFAULT β€˜0’,
totalblogs smallint(5) unsigned NOT NULL DEFAULT β€˜0’,
totalevents smallint(5) unsigned NOT NULL DEFAULT β€˜0’,
expirationdate int(10) unsigned NOT NULL DEFAULT β€˜0’,
picture varchar(32) NOT NULL DEFAULT β€˜β€™,
picture_active tinyint(1) unsigned NOT NULL DEFAULT β€˜1’,
picture_adult tinyint(1) unsigned NOT NULL DEFAULT β€˜0’,
picture_date int(10) unsigned NOT NULL DEFAULT β€˜0’,
statusonline tinyint(1) unsigned NOT NULL DEFAULT β€˜1’,
active tinyint(1) unsigned NOT NULL DEFAULT β€˜1’,
featured tinyint(1) unsigned NOT NULL DEFAULT β€˜0’,
ipaddress varchar(16) NOT NULL DEFAULT β€˜127.0.0.1’,
totalssearches smallint(4) unsigned NOT NULL DEFAULT β€˜0’,
totalvotes int(6) unsigned NOT NULL DEFAULT β€˜0’,
totalscore int(6) unsigned NOT NULL DEFAULT β€˜0’,
totalcredits int(6) unsigned NOT NULL DEFAULT β€˜0’,
album_id int(9) unsigned NOT NULL DEFAULT β€˜0’,
totalviews int(9) unsigned NOT NULL DEFAULT β€˜0’,
completepct tinyint(2) unsigned NOT NULL DEFAULT β€˜0’,
referral_id int(9) unsigned NOT NULL DEFAULT β€˜0’,
totalreferrals smallint(4) unsigned NOT NULL DEFAULT β€˜0’,
PRIMARY KEY (member_id),
KEY group_id (group_id),
KEY username (username)
) ENGINE=MyISAM AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 AUTO_INCREMENT=26 ;

Whew that’s a slew of tables!

Even if you don’t care about any of the other tables those 2 alone look like a massive amount of work.

It looks like you want to migrate osDate forum member accounts into a vldPersonals site.

Old to New

id						int(11) NOT NULL AUTO_INCREMENT,
member_id int(9) unsigned NOT NULL AUTO_INCREMENT,
* should not be a problem unless there are more than 999999999 accounts
 probably can be left unused as long as no old data is to be associated with the account

username				varchar(25) NOT NULL DEFAULT '',
username varchar(32) NOT NULL DEFAULT '',
* good, shorter will fit into longer as long as no other rules are applied eg. certain characters aren't allowed

password				varchar(32) NOT NULL DEFAULT '',
password varchar(32) NOT NULL DEFAULT '',
* might be OK as long as the same hashing is used 

email					varchar(255) DEFAULT NULL,
email varchar(64) NOT NULL DEFAULT '', 
* you will need to check for email addresses longer than 64 characters long. 

In any case, TBH I think the best thing you can do here is start a topic in in the Jobs category and hope for a reasonable offer

Anything is possible with enough knowledge, and time but migration of one system over to another is never an easy task. This isn’t about being a database expert or not it is about understanding the old and new application enough to create a migration script. Either way that is just going to take time, expert or not. I would start with the user/members and branch out to dependency tables like those for permissions to figure out the best way all that will map over to the new system.

Anything is possible with enough knowledge, and time but migration of one system over to another is never an easy task. This isn’t about being a database expert or not it is about understanding the old and new application enough to create a migration script. Either way that is just going to take time, expert or not. I would start with the user/members and branch out to dependency tables like those for permissions to figure out the best way all that will map over to the new system. That all looks like a big pain in the arse *hopefully you charged appropriately for it.

vldPersonals is a commercial product, perhaps they have already put together a migration script for working with osDate and would be happy to assist you to have you as a customer ??

Anything is possible with enough knowledge, and time but migration of one system over to another is never an easy task. This isn’t about being a database expert or not it is about understanding the old and new application enough to create a migration script. Either way that is just going to take time, expert or not. I would start with the user/members and branch out to dependency tables like those for permissions to figure out the best way all that will map over to the new system. That all looks like a big pain in the arse *hopefully you charged appropriately for it. I would also question the client as to whether or not they mean just the users or the entire database. I’m willing to bet the client expects more than just the *users.

Hello Mittineague,

Great analysis, and summary of what will, and what needs to be checked,

That helps me allot, many thank yous Mittineague :slight_smile:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.