Added database migration for contrib.flatpages.

refs #22170.