First part of the mirroring with triggers

Currently runs in dev mode, database recreates on every startup.