-- +goose Up
-- Prepare staging tables for legacy bundesland dump import.

CREATE TABLE IF NOT EXISTS bundesland_old_import (
  id int(11) NOT NULL,
  name varchar(150) NOT NULL,
  state varchar(150) DEFAULT NULL,
  PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

CREATE TABLE IF NOT EXISTS bundesland_old_id_map (
  old_id int(11) NOT NULL,
  new_id binary(16) NOT NULL,
  PRIMARY KEY (old_id),
  UNIQUE KEY uq_bundesland_old_id_map_new_id (new_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

-- +goose Down
DROP TABLE IF EXISTS bundesland_old_id_map;
DROP TABLE IF EXISTS bundesland_old_import;
