This repository has been archived on 2023-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
Foodloop-Server/share/ddl/PostgreSQL/upgrade/1-2/001-auto.sql
2017-07-24 15:39:28 +01:00

27 lines
723 B
PL/PgSQL

-- Convert schema 'share/ddl/_source/deploy/1/001-auto.yml' to 'share/ddl/_source/deploy/2/001-auto.yml':;
;
BEGIN;
;
CREATE TABLE "feedback" (
"id" serial NOT NULL,
"user_id" integer NOT NULL,
"submitted_at" timestamp NOT NULL,
"feedbacktext" text NOT NULL,
"app_name" character varying(255) NOT NULL,
"package_name" character varying(255) NOT NULL,
"version_code" character varying(255) NOT NULL,
"version_number" character varying(255) NOT NULL,
PRIMARY KEY ("id")
);
CREATE INDEX "feedback_idx_user_id" on "feedback" ("user_id");
;
ALTER TABLE "feedback" ADD CONSTRAINT "feedback_fk_user_id" FOREIGN KEY ("user_id")
REFERENCES "users" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION;
;
COMMIT;