Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 739 Bytes

File metadata and controls

19 lines (13 loc) · 739 Bytes

Bulk Renaming Columns in SQLite3

Function friendly modular script to rename columns in SQLite3.

The process

  1. Extract the column names and types from the old table.
  2. Rename old table with the word 'temp' added to it.
  3. Do your modifications with the column names and return a list
  4. Create a new table with the new column names, old column types
  5. Transfer data from the old table to a new table
  6. Drop old table

Reference