Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Import v1.13 defs into v2.0 format tables

Quote Reply
Import v1.13 defs into v2.0 format tables
Hello Alex!

You have provided an excellent possibility to import data from the existing 1.13 to 2.0 versions. However, if the default table format of v2.0 is not the same than 1.13, what should one do? The best is to recreate a new table from the 1.13 defs and integrate then into v2.0 and make new defs + table. Then import could be flawless and would be upgradable for any versions and format. This actually also allpies to all other products.

The best would be to specify what fields needs to be imported and if the fields needs to be added during the imports.

It is a lot of headache to export the database tables in 1.13 and then import into 2.0! What about the category information that is in terms of numbers i.e. CatIDs. If the CatIDs are missing some IDs then during the re-import they will loose their links to the original categoryIDs, since it would then point to a wrong ID. Export does not actually export the real category name and thats the problem.

Quote Reply
Re: Import v1.13 defs into v2.0 format tables In reply to
Hi,

To import from 1.x you should:

1. Install Links SQL 2 into a separate directory.
2. Setup Links SQL 2 using a separate database, or if you only have one database, make sure to use Prefix during installation (i.e. if you use new_ then all tables will be prefixed with new_ as in new_Users, new_Links, etc.) This way you can have both programs in the same database without conflicting.
3. Run the nph-import.cgi script. For large databases you need to run this from shell. You put the path to the old def, and path to the new def directory and it will import all your data and any custom columns you had.

You do not need to export from Links SQL 1.x.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Import v1.13 defs into v2.0 format tables In reply to
Hello Alex!

OK. I have tried like before but no sucess. Following are the errors:

Import error: Warning: Custom import column `Users.User' had no destination equivelant. A column will be created

Import error: Warning: Custom import column `Users.Pass' had no destination equivelant. A column will be created

Import error: CRITICAL ERROR OCCURED: Unable to execute query `SELECT Username, Password, Email, Validation, Status, User, Pass, Pass, User FROM Users': Table 'Database.Users' doesn't exist at /usr/.../Import/S1S2.pm line 282

What it does is simply creating two columns User, Pass in the table and crashes. Here there is no control as to which field goes where. Table.Validate has all the data that needs to be distributed into different tables in Links SQL v2.0 and therefore this would be necessary.

What I meant was that if in the import routines if one could select fields and either delete or rename them then it can function. I mean otherwise it does what may be unwanted. For e.g. earlier there was User + Pass in the Links1.Validate and now Username + Password table. So what it will do is create and bring the data with the same Properties to the new table. The custom_new table created by import.cgi may not have the same properties as the default_new. This would also be in a conflict with the INDEXES.

Almost everyone has customized their tables and hence an import utility that functions is therefore an acute necessicity.

Quote Reply
Re: Import v1.13 defs into v2.0 format tables In reply to
Hi,

Are you using beta4? That bug should already be fixed. The import will import any custom columns you have added to your Links SQL 1.x installation and automatically add those columns to your Links SQL 2 installation.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Import v1.13 defs into v2.0 format tables In reply to
Hello Alex!

On the right in admin it says the following:

Version: 2.0.0-beta4
Home | Browse | Database | Build | Email | Plugins | Setup | Static | Dynamic
Help

Do you mean beta 2.4? or 2.0.4 beta or 2.0.0b4? I have downloaded the latest and in the admin it shows as above. Like in the G-Mail it shows 1.1.5 and the download file shows 1.1.6! What a mess and confusion!

Quote Reply
Re: Import v1.13 defs into v2.0 format tables In reply to
My mistake, we have fixed that bug locally, but it was not done in beta4. It will be fixed with the next release due out tonight.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Import v1.13 defs into v2.0 format tables In reply to
Hello Alex!

Thanks! That would be great.

However, I do think that if there is an option of adding with defaults or deleting fields or changing their names DURING IMPORTS becomes extremely important.

Following are my suggestions:

The Import routine gives
- A list of Old.tables to be imported.
- Clicking on a Old.table offers further listing of fields.
- Further, on the left offers Old.table fields and on the right New.table fields
- (VERY IMPORTANT STEP) One can move field names from left to right and select the field names. This helps in distributing the data in different tables.
- After selecting of names of the fields it would ask for properties changes like for e.g. creating desired INDEXES, New.field.name, etc
- Do further normal stuff like defs, etc....

Further, I would very much appreciate to see if during EXPORTS the category names are exported and not simply numbers.

Quote Reply
Re: Import v1.13 defs into v2.0 format tables In reply to
Hello Alex!

I am still not able to import and gives the same error as mentioned above.

It simply creates two extra fields and dies.

I have some many links in the Validate table (Version 1.1x). How shalll I import them in to v2.x?

Quote Reply
Re: [rajani] Import v1.13 defs into v2.0 format tables In reply to
Hello Alex!

Waiting until 2.0.5 also does not prove any change.

It does not import.

Can you help, please.

It simply says it creates extra columns and then dies. Most likely it is 30 sec. CPU problem.

Is it possible to make a change somewhere that after import it could delete the old so that there is no problem in the unique.

Or atleast if it could make a change somewhere that it could import links in a batch of some xx number. Or from link ID xx to Links ID yy into the new table.


Quote Reply
Re: [rajani] Import v1.13 defs into v2.0 format tables In reply to
Email me a mysqldump of your 1.x data file and I'll try it out here.

Cheers,

Alex
--
Gossamer Threads Inc.