move battery table to end of schema script to fix foreign key error