[DB] Fix table names, gen repositories