Add unique constraints

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
Create db on filesystem

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>