Skip to content

Drop a column on migration #467

Closed
Closed
@eyal-fairfly

Description

@eyal-fairfly

Hello,

I am migrating the DB to a newer version (kudos for making the migration process easy) and I wish to drop a few columns which are no longer necessary. I've looked around but couldn't find any reference, is this possible?

Thank you!

Activity

agrosner

agrosner commented on Nov 18, 2015

@agrosner
Owner

This is a SQLite question, and short answer is...not easily. You have to (this is with SQLite too):

  1. Create new table without column with temporary name
  2. Copy over data to it
  3. Drop old table
  4. Recreate new table with column left out

As I said, not easy.

eyal-fairfly

eyal-fairfly commented on Nov 18, 2015

@eyal-fairfly
Author

Thank you for the prompt reply 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @agrosner@eyal-fairfly

        Issue actions

          Drop a column on migration · Issue #467 · agrosner/DBFlow