# migration tests

FEATURE: migration 7 - table rename
background:
 configure loadFKs = true
thenType: struct

# -- start chain ---
---
title: migration7
chainNextTest:true
given:
 type Customer struct {id int unique serial, wid int } end

when:
  insert Customer { wid:33}
  let x = Customer[1]
then:
value:a:Customer {
 vid:1
 vwid:33
}

---
title: migration7.1 - rename table
given:
 type Customers struct {id int unique serial, wid int } end

when:
  insert Customers { wid:34}
  let x = Customers[true].orderBy('id')
then:
value:a:Customers {
 vid:1
 vwid:33
}
value:a:Customers {
 vid:2
 vwid:34
}

