Home > Enterprise >  Pre-packaged database has an invalid schema, order mixed up
Pre-packaged database has an invalid schema, order mixed up

Time:01-12

I'm trying to implement this database with quite a few parameters. Unfortunately I cannot figure out why the order is mixed up that badly. The database is being read from the assets, it's already populated with ~250 items.

Error Message:

Expected:                                                                                     
TableInfo{name='Item', columns={tradingItem3Amount=Column{name='tradingItem3Amount', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}, itemCrafting2Amount=Column{name='itemCrafting2Amount', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}, description=Column{name='description', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='null'}, itemCrafting4Amount=Column{name='itemCrafting4Amount', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}, buoyancy=Column{name='buoyancy', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}, ItemCategory=Column{name='ItemCategory', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='null'}, tradingItem1Amount=Column{name='tradingItem1Amount', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}, itemCrafting3=Column{name='itemCrafting3', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='null'}, itemCrafting4=Column{name='itemCrafting4', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='null'}, itemCrafting1=Column{name='itemCrafting1', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='null'}, itemCrafting2=Column{name='itemCrafting2', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='null'}, itemCraftingAmount=Column{name='itemCraftingAmount', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}, id=Column{name='id', type='TEXT', affinity='2', notNull=true, primaryKeyPosition=1, defaultValue='null'}, durability=Column{name='durability', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}, weight=Column{name='weight', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}, friction=Column{name='friction', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}, itemCrafting3Amount=Column{name='itemCrafting3Amount', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}, imgUrl=Column{name='imgUrl', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}, tradingItem1=Column{name='tradingItem1', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='null'}, tradingItem2=Column{name='tradingItem2', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='null'}, tradingItem3=Column{name='tradingItem3', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='null'}, name=Column{name='name', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='null'}, flammable=Column{name='flammable', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}, itemCrafting1Amount=Column{name='itemCrafting1Amount', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}, tradingItem2Amount=Column{name='tradingItem2Amount', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}, modpack=Column{name='modpack', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='null'}, extraInfo=Column{name='extraInfo', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='null'}, tradingAmount=Column{name='tradingAmount', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}}, foreignKeys=[], indices=[]}

                                                                         
Found:
TableInfo{name='Item', columns={Category=Column{name='Category', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='null'}, Description=Column{name='Description', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='null'}, tradingItem3Amount=Column{name='tradingItem3Amount', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}, Name=Column{name='Name', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='null'}, tradingItem1Amount=Column{name='tradingItem1Amount', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}, itemCrafting3=Column{name='itemCrafting3', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='null'}, itemCrafting4=Column{name='itemCrafting4', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='null'}, itemCrafting1=Column{name='itemCrafting1', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='null'}, itemCrafting2=Column{name='itemCrafting2', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='null'}, itemCraftingAmount=Column{name='itemCraftingAmount', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}, id=Column{name='id', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=1, defaultValue='null'}, itemCraftingAmount1=Column{name='itemCraftingAmount1', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}, itemCraftingAmount2=Column{name='itemCraftingAmount2', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}, itemCraftingAmount3=Column{name='itemCraftingAmount3', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}, itemCraftingAmount4=Column{name='itemCraftingAmount4', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}, Durability=Column{name='Durability', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}, Flammable=Column{name='Flammable', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}, Bouyancy=Column{name='Bouyancy', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}, ItemID=Column{name='ItemID', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='null'}, Weight=Column{name='Weight', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}, tradingItem1=Column{name='tradingItem1', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='null'}, tradingItem2=Column{name='tradingItem2', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='null'}, tradingItem3=Column{name='tradingItem3', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='null'}, Friction=Column{name='Friction', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}, tradingItem2Amount=Column{name='tradingItem2Amount', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}, modpack=Column{name='modpack', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='null'}, extraInfo=Column{name='extraInfo', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='null'}, tradingAmount=Column{name='tradingAmount', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='null'}}, foreignKeys=[], indices=[]}

The create statement:

This statement is copied from enter image description here

  • Related