Add blocks table to database
Subtask of #1240
issue