import { UserMembership } from '@ulangi/ulangi-common/enums' ; import * as knex from 'knex' ; import { TableName } from '../../enums/TableName' ; export async function migration_04 ( tx ) { await addMembershipColumnsToUserTable ( tx ) ; } function addMembershipColumnsToUserTable ( db ) { return db . raw ( `
    ALTER TABLE ${ TableName . USER } 
      ADD membership VARCHAR(60) NOT NULL DEFAULT '${ UserMembership . REGULAR }',
      ADD membershipExpiredAt DATETIME;
  ` ) ; }