Code: Select all
"3.a Upgrade - bleibt wie es ist...
3.b Migration
Prerequisites:
1. Application that is capable of exporting csv data
2. Ready configured phpMyAdmin for importing the csv data
3. A recent backup copy of your database
If you would like to migrate your existing data into your phpMyFAQ database we recommend the following steps:
1. Write down your categories to have them available later (or print them with phpMyAdmin); you will find the data in the xx_faqcategories table. If you do not have any categories yet this is a good time for creating them, you´ll need them in less tha a minute...
2. Open your application used for calculations (e.g. OpenOffice, Excel, etc.)
3. Create a new sheet containing the following data:
id lang active rubrik keywords thema content author email comment datum
In case you do not have any data already in the phpMyFAQ database your "id" field counts from 1 otherwise look at your current xx_faqdata to find out the highest "id" number to start counting from. The field "lang" contains the language you prefer. In my case you´ll find "de" becuase my preferred language is German. Set "active" to "yes" (without qoutation marks of course) otherwise the data won´t display later. "rubrik" stands for the categories that you created earlier. You can leave out "keywords" for now but remember that you´ll need them in case you want to find your FAQs by keywords. "thema" describes the FAQ topic or in other words the question. "content" contains the answer to the frequently asked question. "author" and "email" shold be seld-explanatory. "comment" is just a value and can be "y" or "n". I´d prefer "n" to disable users from commenting but this is up to you. You should be careful with "datum" as this value strongly depends on the format. An example would look like this: 20050401090000 in other words: 4digits year (2005), 2 digits month (04), 2 digits day (01), 2 digits hour (09), 2 digits minutes (00) and 2 digits seconds (00). Your table could look like this now:
id lang active rubrik keywords thema content author email comment datum
1 de yes FAQ phpMyFAQ Is there any better solution than phpMyFAQ? No! Nordlicht nordlicht at home de n 20050401090101
Be aware that the fields containing numbers should default to "number" with 0 decimals otherwise phpMyAdmin could do wrong. Now you are ready to export to csv. Do yourself a favour and avoid any spaces in the filename, UNIXes could have trouble to read the filename otherwise.
4. Open your phpMyAdmin URL and open your phpMyFAQ database (even if it was still empty). Scroll down the page click on the link "import text file" ("Textdatei in Tabelle einfügen"), choose your file and click "submit" button.
That´s it. Should you have any trouble it is a good time to restore your data from the backup you saved earlier."
Grüsse,
Nordlicht