Migrate DB from varchar to text (< 0.9.5 to ≥ 0.9.5)

This migration has to be done on every server, which was originally created using stack version < 0.9.5

Instructions

  1. Open UMHLens

  2. Open a Shell inside the timescale pod

    Untitled

  3. Execute

    psql
    

    Untitled

  4. Execute these SQL statements

    \c factoryinsight
    ALTER TABLE assettable ALTER COLUMN assetid TYPE text;
    ALTER TABLE assettable ALTER COLUMN location TYPE text;
    ALTER TABLE assettable ALTER COLUMN customer TYPE text;
    ALTER TABLE producttable ALTER COLUMN product_name TYPE text;
    ALTER TABLE ordertable ALTER COLUMN order_name TYPE text;
    ALTER TABLE configurationtable ALTER COLUMN customer TYPE text;
    ALTER TABLE componenttable ALTER COLUMN componentname TYPE text;
    

    Untitled

  5. Confirm the changes by using

    SELECT COLUMN_NAME, DATA_TYPE FROM information_schema.columns WHERE TABLE_NAME = 'assettable';
    SELECT COLUMN_NAME, DATA_TYPE FROM information_schema.columns WHERE TABLE_NAME = 'producttable';
    SELECT COLUMN_NAME, DATA_TYPE FROM information_schema.columns WHERE TABLE_NAME = 'ordertable';
    SELECT COLUMN_NAME, DATA_TYPE FROM information_schema.columns WHERE TABLE_NAME = 'configurationtable';
    SELECT COLUMN_NAME, DATA_TYPE FROM information_schema.columns WHERE TABLE_NAME = 'componenttable';
    

    Untitled

Last modified February 17, 2023: update (#208) (ea731fc)