Flyway: связь не существует - PullRequest
0 голосов
/ 25 января 2019
ERROR: relation "signature_level" does not exist

У меня проблемы с выяснением, в чем проблема. Flyway выдает мне эту ошибку при миграции.

CREATE TABLE IF NOT EXISTS "user" (
  id SERIAL NOT NULL PRIMARY KEY,
  name text NOT NULL,
  id_code numeric NOT NULL,
  email text NOT NULL,
  address text,
  alt_contact_relation text NULL,
  alt_contact_phone numeric NULL,
  signature_level_id integer NULL,
  username text NOT NULL,
  password text NOT NULL,
  create_time TIMESTAMP without TIME ZONE DEFAULT now() NOT NULL,
  update_time TIMESTAMP without TIME ZONE DEFAULT now() NOT NULL,
  status active_status NOT NULL DEFAULT 'active',
  work_detail_id integer NULL,
  CONSTRAINT FK_user_signature_level FOREIGN KEY (signature_level_id) REFERENCES signature_level (id)
  ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT FK_user_work_detail FOREIGN KEY (work_detail_id) REFERENCES work_detail (id)
  ON DELETE NO ACTION ON UPDATE NO ACTION
);

Это таблица уровня подписи.

CREATE TABLE IF NOT EXISTS "signature_level" (
  id SERIAL NOT NULL PRIMARY KEY,
  name text NOT NULL,
  create_time TIMESTAMP without TIME ZONE DEFAULT now() NOT NULL,
  update_time TIMESTAMP without TIME ZONE DEFAULT now() NOT NULL
);
...