2

This my sqlite database i want to chang this db to mysql db

DROP TABLE IF EXISTS 'ifse_content';
CREATE VIRTUAL TABLE ifse_content USING fts3(url, title, keywords, desc, content, tokenize=porter);
DROP TABLE IF EXISTS 'ifse_content_content';
CREATE TABLE 'ifse_content_content'(docid INTEGER PRIMARY KEY, 'c0url', 'c1title', 'c2keywords', 'c3desc', 'c4content');
DROP TABLE IF EXISTS 'ifse_content_segdir';
CREATE TABLE 'ifse_content_segdir'(level INTEGER,idx INTEGER,start_block INTEGER,leaves_end_block INTEGER,end_block INTEGER,root BLOB,PRIMARY KEY(level, idx));
DROP TABLE IF EXISTS 'ifse_content_segments';
CREATE TABLE 'ifse_content_segments'(blockid INTEGER PRIMARY KEY, block BLOB);

how to convert this sqlite database to mysql database

0

1 Answer 1

2

Bit too long for a comment

In sqlite you don't have to specify types for columns in create statements but in mysql you need to. Looking at your tables, it's not possible for anyone to figure out what the column types are so no one can give you a complete answer. But we can give you some hints.

CREATE VIRTUAL TABLE ifse_content USING fts3(url, title, keywords, desc, content, tokenize=porter);

This creates a table with Full Text Search support something like

CREATE TABLE ifse_content( ...
   content varchar(255),
   ..
   FULLTEXT ids(content));

For creating the other tables, specify the column types and remove the single quotes. They should work without too much trouble.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.