modify column data type using knex raw query

    0

    0

    Library: express

    
    
    knex.raw('ALTER TABLE "' + table + '" ALTER COLUMN "' + column + '" TYPE ' + newType + '')
    
    
    ALTER TABLE [schema_name.]table_name
    ALTER COLUMN <column_name> [SET DATA] TYPE <new_data_type>,
    ALTER COLUMN <column_name> [SET DATA] TYPE <new_data_type>
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.