You will need to reindex the blockchain. Start Bitcoin Core with the -reindex option. Note that this is a command line option for when you start Bitcoin Core, NOT something you enter into Core's debug console. For specific instructions on how to start Core with -reindex, we need to know what OS you are using.