import * as knex from 'knex' ; import { TableName } from '../../enums/TableName' ; export async function migration_02 ( tx ) { await addSyncedAtColumnsToUserTable ( tx ) ; } function addSyncedAtColumnsToUserTable ( db ) { return db . raw ( `
    ALTER TABLE ${ TableName . USER } 
      ADD firstSyncedAt DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
      ADD lastSyncedAt DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
  ` ) ; }