Move db to core