Adapt to new database