fix database auto-increment in some tables
structure to insert entries with eav (need abstraction for work in other tables)