# migration tests

FEATURE: migration 16 - alter field add serial +S
background:
 configure loadFKs = true
thenType: struct

# -- start chain ---
---
title: migration14
chainNextTest:true
given:
 type Customer struct {id int primaryKey, wid int, height int } end

when:
  insert Customer {id: 1, wid:33, height:44}
  let x = Customer[1]
then:
value:a:Customer {
 vid:1
 vwid:33
 vheight:44
}

---
title: migration14.1 - alter field 
given:
 type Customer struct {id int primaryKey serial, wid int, height int } end

when:
  insert Customer { wid:34, height:45}
  let x = Customer[true].orderBy('id')
then:
ERROR: migration-failed-due-to-policy
