-stores/restores layout in DB

Signed-off-by: Artyom Borkowsky <artyom_borkowsky@stylesoft.by>