CREATE TABLE contact
(
  id serial NOT NULL,
  name_en character varying(50),
  name_pl character varying(50),
  name_de character varying(50),
  name_ru character varying(50),
  description text
)
WITH (OIDS=FALSE);

CREATE TABLE past_projects
(
  title character varying(255),
  id serial NOT NULL,
  google_link text,
  active boolean DEFAULT false,
  CONSTRAINT past_project_pkey PRIMARY KEY (id)
)
WITH (OIDS=FALSE);

CREATE TABLE past_project_image
(
  id serial NOT NULL,
  past_project_id integer NOT NULL,
  photo character varying(250),
  thumb character varying(250),
  rank integer,
  created_at timestamp without time zone,
  description_pl text,
  description_en text,
  description_de text,
  description_ru text,
  CONSTRAINT past_project_image_pkey PRIMARY KEY (id),
  CONSTRAINT "past_project_image_FK_1" FOREIGN KEY (past_project_id)
      REFERENCES past_projects (id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE CASCADE
)
WITH (OIDS=FALSE);

