Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8488455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:32:28+00:00 2026-06-10T21:32:28+00:00

In my previous app release I had a table created like: public static final

  • 0

In my previous app release I had a table created like:

public static final String CREATE_DATABASE = "CREATE TABLE " + TABLE_NAME
        + "(_id INTEGER PRIMARY KEY AUTOINCREMENT," + COLUMN_NAME_TITLE + " TEXT, "
        + COLUMN_NAME_LOGIN + " TEXT, " + COLUMN_NAME_PASSWORD + " TEXT, " + COLUMN_NAME_NOTES
        + " TEXT);";

In current version I have a table created like:

public static final String CREATE_DATABASE = "CREATE VIRTUAL TABLE " + TABLE_NAME + " USING fts3 "
        + "(_id INTEGER PRIMARY KEY AUTOINCREMENT," + COLUMN_NAME_TITLE + " TEXT, "
        + COLUMN_NAME_LOGIN + " TEXT, " + COLUMN_NAME_PASSWORD + " TEXT, " + COLUMN_NAME_NOTES
        + " TEXT, " + COLUMN_NAME_FAV + " INTEGER DEFAULT 0, " + KEY_WORD + ");";

So now it is VIRTUAL, created USING fts3 and added two new columns COLUMN_NAME_FAV and KEY_WORD.

Is that possible to ALTER the table somehow on upgrade? If not, what shall I do so users don’t lose their data?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T21:32:30+00:00Added an answer on June 10, 2026 at 9:32 pm

    It is not possible to run a simple alter command that will convert a regular table to a VIRTUAL table.

    Instead of that you should:

    1. Load the data from the table into the memory / copy the table.
    2. DROP the old table.
    3. CREATE the new table.
    4. Populate the new table with the data from step 1.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From a previous FB SO question, I worked out that the Create New App
I'm gonna release a new version of my app. The previous version used some
I have a tabBar App, with 5 tabs. The application was built in previous
I'm trying to figure out how my new app should handle data. In previous
I am refactoring some legacy code. The app was not using querystrings. The previous
In previous versions of Excel there was a registry entry that you could create
From previous experience I had been under the impression that it's perfectly legal (though
In previous question of mine, someone had meantioned that using Semaphores were expensive in
I'm implementing a table per subclass design I discussed in a previous question .
I've no previous experience with tools like Liquibase and similar. Up to now the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.