--
-- PostgreSQL database dump
--

-- Dumped from database version 11.7 (Debian 11.7-0+deb10u1)
-- Dumped by pg_dump version 11.7 (Debian 11.7-0+deb10u1)

SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;

ALTER TABLE IF EXISTS ONLY public.maps_type DROP CONSTRAINT IF EXISTS maps_type_parent_id_b8277754_fk_maps_type_id;
ALTER TABLE IF EXISTS ONLY public.maps_scan_scan_type DROP CONSTRAINT IF EXISTS maps_scan_scan_type_type_id_fc19d491_fk_maps_type_id;
ALTER TABLE IF EXISTS ONLY public.maps_scan_scan_type DROP CONSTRAINT IF EXISTS maps_scan_scan_type_scan_id_2d3729f3_fk_maps_scan_id;
ALTER TABLE IF EXISTS ONLY public.maps_scan_scan_reference DROP CONSTRAINT IF EXISTS maps_scan_scan_reference_scan_id_c86b5a3e_fk_maps_scan_id;
ALTER TABLE IF EXISTS ONLY public.maps_scan_scan_reference DROP CONSTRAINT IF EXISTS maps_scan_scan_refer_reference_id_efaf24e5_fk_maps_refe;
ALTER TABLE IF EXISTS ONLY public.maps_scan_scan_person DROP CONSTRAINT IF EXISTS maps_scan_scan_person_scan_id_88d9cce9_fk_maps_scan_id;
ALTER TABLE IF EXISTS ONLY public.maps_scan_scan_person DROP CONSTRAINT IF EXISTS maps_scan_scan_person_person_id_f99c3461_fk_maps_person_id;
ALTER TABLE IF EXISTS ONLY public.maps_scan_scan_map DROP CONSTRAINT IF EXISTS maps_scan_scan_map_scan_id_21a19138_fk_maps_scan_id;
ALTER TABLE IF EXISTS ONLY public.maps_scan_scan_map DROP CONSTRAINT IF EXISTS maps_scan_scan_map_map_id_9e720248_fk_maps_map_id;
ALTER TABLE IF EXISTS ONLY public.maps_reference DROP CONSTRAINT IF EXISTS maps_reference_super_id_09e3bb42_fk_maps_reference_id;
ALTER TABLE IF EXISTS ONLY public.maps_reference_reference_type DROP CONSTRAINT IF EXISTS maps_reference_reference_type_type_id_7e338932_fk_maps_type_id;
ALTER TABLE IF EXISTS ONLY public.maps_reference_reference_type DROP CONSTRAINT IF EXISTS maps_reference_refer_reference_id_38cd6479_fk_maps_refe;
ALTER TABLE IF EXISTS ONLY public.maps_place_place_type DROP CONSTRAINT IF EXISTS maps_place_place_type_type_id_fbbfec63_fk_maps_type_id;
ALTER TABLE IF EXISTS ONLY public.maps_place_place_type DROP CONSTRAINT IF EXISTS maps_place_place_type_place_id_21fde972_fk_maps_place_id;
ALTER TABLE IF EXISTS ONLY public.maps_person_person_type DROP CONSTRAINT IF EXISTS maps_person_person_type_type_id_138219a0_fk_maps_type_id;
ALTER TABLE IF EXISTS ONLY public.maps_person_person_type DROP CONSTRAINT IF EXISTS maps_person_person_type_person_id_94b985a4_fk_maps_person_id;
ALTER TABLE IF EXISTS ONLY public.maps_person DROP CONSTRAINT IF EXISTS maps_person_person_location_id_e23c9ecc_fk_maps_place_id;
ALTER TABLE IF EXISTS ONLY public.maps_person_person_institutes DROP CONSTRAINT IF EXISTS maps_person_person_i_person_id_02ba207a_fk_maps_pers;
ALTER TABLE IF EXISTS ONLY public.maps_person_person_institutes DROP CONSTRAINT IF EXISTS maps_person_person_i_institute_id_3123fbb4_fk_maps_inst;
ALTER TABLE IF EXISTS ONLY public.maps_map_map_type DROP CONSTRAINT IF EXISTS maps_map_map_type_type_id_c24ef6de_fk_maps_type_id;
ALTER TABLE IF EXISTS ONLY public.maps_map_map_type DROP CONSTRAINT IF EXISTS maps_map_map_type_map_id_a296045b_fk_maps_map_id;
ALTER TABLE IF EXISTS ONLY public.maps_map_map_scan DROP CONSTRAINT IF EXISTS maps_map_map_scan_map_id_8d0022f4_fk_maps_map_id;
ALTER TABLE IF EXISTS ONLY public.maps_map_map_references DROP CONSTRAINT IF EXISTS maps_map_map_references_map_id_6d8dfd3f_fk_maps_map_id;
ALTER TABLE IF EXISTS ONLY public.maps_map_map_references DROP CONSTRAINT IF EXISTS maps_map_map_referen_reference_id_459a89ca_fk_maps_refe;
ALTER TABLE IF EXISTS ONLY public.maps_map_map_places DROP CONSTRAINT IF EXISTS maps_map_map_places_place_id_1a799e4a_fk_maps_place_id;
ALTER TABLE IF EXISTS ONLY public.maps_map_map_places DROP CONSTRAINT IF EXISTS maps_map_map_places_map_id_cdf091f2_fk_maps_map_id;
ALTER TABLE IF EXISTS ONLY public.maps_map_map_persons DROP CONSTRAINT IF EXISTS maps_map_map_persons_person_id_dae77c35_fk_maps_person_id;
ALTER TABLE IF EXISTS ONLY public.maps_map_map_persons DROP CONSTRAINT IF EXISTS maps_map_map_persons_map_id_aa413b5f_fk_maps_map_id;
ALTER TABLE IF EXISTS ONLY public.maps_map DROP CONSTRAINT IF EXISTS maps_map_map_location_id_2b1e0353_fk_maps_place_id;
ALTER TABLE IF EXISTS ONLY public.maps_map DROP CONSTRAINT IF EXISTS maps_map_map_issued_id_0895c253_fk_maps_place_id;
ALTER TABLE IF EXISTS ONLY public.maps_map_map_institute DROP CONSTRAINT IF EXISTS maps_map_map_institute_map_id_6256af8a_fk_maps_map_id;
ALTER TABLE IF EXISTS ONLY public.maps_map_map_institute DROP CONSTRAINT IF EXISTS maps_map_map_institu_institute_id_22dabb5a_fk_maps_inst;
ALTER TABLE IF EXISTS ONLY public.maps_map_map_file DROP CONSTRAINT IF EXISTS maps_map_map_file_map_id_9e4e4fb7_fk_maps_map_id;
ALTER TABLE IF EXISTS ONLY public.maps_map DROP CONSTRAINT IF EXISTS maps_map_map_copy_id_d8a9b7a1_fk_maps_map_id;
ALTER TABLE IF EXISTS ONLY public.maps_map DROP CONSTRAINT IF EXISTS maps_map_map_base_id_d4c8d198_fk_maps_map_id;
ALTER TABLE IF EXISTS ONLY public.maps_institute_institute_type DROP CONSTRAINT IF EXISTS maps_institute_institute_type_type_id_4764f400_fk_maps_type_id;
ALTER TABLE IF EXISTS ONLY public.maps_institute DROP CONSTRAINT IF EXISTS maps_institute_institute_location_id_6a11dc54_fk_maps_place_id;
ALTER TABLE IF EXISTS ONLY public.maps_institute_institute_type DROP CONSTRAINT IF EXISTS maps_institute_insti_institute_id_278e76cc_fk_maps_inst;
ALTER TABLE IF EXISTS ONLY public.maps_file_file_type DROP CONSTRAINT IF EXISTS maps_file_file_type_type_id_deb4d1f7_fk_maps_type_id;
ALTER TABLE IF EXISTS ONLY public.maps_file_file_type DROP CONSTRAINT IF EXISTS maps_file_file_type_file_id_bc62ba18_fk_maps_file_id;
ALTER TABLE IF EXISTS ONLY public.maps_file_file_reference DROP CONSTRAINT IF EXISTS maps_file_file_reference_file_id_fda1266a_fk_maps_file_id;
ALTER TABLE IF EXISTS ONLY public.maps_file_file_reference DROP CONSTRAINT IF EXISTS maps_file_file_refer_reference_id_d0f31d94_fk_maps_refe;
ALTER TABLE IF EXISTS ONLY public.maps_file_file_map DROP CONSTRAINT IF EXISTS maps_file_file_map_map_id_9e0bdd7c_fk_maps_map_id;
ALTER TABLE IF EXISTS ONLY public.maps_file_file_map DROP CONSTRAINT IF EXISTS maps_file_file_map_file_id_c307ffeb_fk_maps_file_id;
ALTER TABLE IF EXISTS ONLY public.django_admin_log DROP CONSTRAINT IF EXISTS django_admin_log_user_id_c564eba6_fk_auth_user_id;
ALTER TABLE IF EXISTS ONLY public.django_admin_log DROP CONSTRAINT IF EXISTS django_admin_log_content_type_id_c4bce8eb_fk_django_co;
ALTER TABLE IF EXISTS ONLY public.auth_user_user_permissions DROP CONSTRAINT IF EXISTS auth_user_user_permissions_user_id_a95ead1b_fk_auth_user_id;
ALTER TABLE IF EXISTS ONLY public.auth_user_user_permissions DROP CONSTRAINT IF EXISTS auth_user_user_permi_permission_id_1fbb5f2c_fk_auth_perm;
ALTER TABLE IF EXISTS ONLY public.auth_user_groups DROP CONSTRAINT IF EXISTS auth_user_groups_user_id_6a12ed8b_fk_auth_user_id;
ALTER TABLE IF EXISTS ONLY public.auth_user_groups DROP CONSTRAINT IF EXISTS auth_user_groups_group_id_97559544_fk_auth_group_id;
ALTER TABLE IF EXISTS ONLY public.auth_permission DROP CONSTRAINT IF EXISTS auth_permission_content_type_id_2f476e4b_fk_django_co;
ALTER TABLE IF EXISTS ONLY public.auth_group_permissions DROP CONSTRAINT IF EXISTS auth_group_permissions_group_id_b120cbf9_fk_auth_group_id;
ALTER TABLE IF EXISTS ONLY public.auth_group_permissions DROP CONSTRAINT IF EXISTS auth_group_permissio_permission_id_84c5c92e_fk_auth_perm;
DROP INDEX IF EXISTS public.maps_type_tree_id_9ddf6cd6;
DROP INDEX IF EXISTS public.maps_type_rght_04c51423;
DROP INDEX IF EXISTS public.maps_type_parent_id_b8277754;
DROP INDEX IF EXISTS public.maps_type_lft_f368a00c;
DROP INDEX IF EXISTS public.maps_type_level_994128a4;
DROP INDEX IF EXISTS public.maps_scan_scan_type_type_id_fc19d491;
DROP INDEX IF EXISTS public.maps_scan_scan_type_scan_id_2d3729f3;
DROP INDEX IF EXISTS public.maps_scan_scan_reference_scan_id_c86b5a3e;
DROP INDEX IF EXISTS public.maps_scan_scan_reference_reference_id_efaf24e5;
DROP INDEX IF EXISTS public.maps_scan_scan_person_scan_id_88d9cce9;
DROP INDEX IF EXISTS public.maps_scan_scan_person_person_id_f99c3461;
DROP INDEX IF EXISTS public.maps_scan_scan_map_scan_id_21a19138;
DROP INDEX IF EXISTS public.maps_scan_scan_map_map_id_9e720248;
DROP INDEX IF EXISTS public.maps_reference_super_id_09e3bb42;
DROP INDEX IF EXISTS public.maps_reference_reference_type_type_id_7e338932;
DROP INDEX IF EXISTS public.maps_reference_reference_type_reference_id_38cd6479;
DROP INDEX IF EXISTS public.maps_place_place_type_type_id_fbbfec63;
DROP INDEX IF EXISTS public.maps_place_place_type_place_id_21fde972;
DROP INDEX IF EXISTS public.maps_person_person_type_type_id_138219a0;
DROP INDEX IF EXISTS public.maps_person_person_type_person_id_94b985a4;
DROP INDEX IF EXISTS public.maps_person_person_location_id_e23c9ecc;
DROP INDEX IF EXISTS public.maps_person_person_institutes_person_id_02ba207a;
DROP INDEX IF EXISTS public.maps_person_person_institutes_institute_id_3123fbb4;
DROP INDEX IF EXISTS public.maps_map_map_type_type_id_c24ef6de;
DROP INDEX IF EXISTS public.maps_map_map_type_map_id_a296045b;
DROP INDEX IF EXISTS public.maps_map_map_scan_scan_id_465e3c0c;
DROP INDEX IF EXISTS public.maps_map_map_scan_map_id_8d0022f4;
DROP INDEX IF EXISTS public.maps_map_map_references_reference_id_459a89ca;
DROP INDEX IF EXISTS public.maps_map_map_references_map_id_6d8dfd3f;
DROP INDEX IF EXISTS public.maps_map_map_places_place_id_1a799e4a;
DROP INDEX IF EXISTS public.maps_map_map_places_map_id_cdf091f2;
DROP INDEX IF EXISTS public.maps_map_map_persons_person_id_dae77c35;
DROP INDEX IF EXISTS public.maps_map_map_persons_map_id_aa413b5f;
DROP INDEX IF EXISTS public.maps_map_map_location_id_2b1e0353;
DROP INDEX IF EXISTS public.maps_map_map_issued_id_0895c253;
DROP INDEX IF EXISTS public.maps_map_map_institute_map_id_6256af8a;
DROP INDEX IF EXISTS public.maps_map_map_institute_institute_id_22dabb5a;
DROP INDEX IF EXISTS public.maps_map_map_file_map_id_9e4e4fb7;
DROP INDEX IF EXISTS public.maps_map_map_file_file_id_8ba3db90;
DROP INDEX IF EXISTS public.maps_map_map_copy_id_d8a9b7a1;
DROP INDEX IF EXISTS public.maps_map_map_base_id_d4c8d198;
DROP INDEX IF EXISTS public.maps_institute_institute_type_type_id_4764f400;
DROP INDEX IF EXISTS public.maps_institute_institute_type_institute_id_278e76cc;
DROP INDEX IF EXISTS public.maps_institute_institute_location_id_6a11dc54;
DROP INDEX IF EXISTS public.maps_file_file_type_type_id_deb4d1f7;
DROP INDEX IF EXISTS public.maps_file_file_type_file_id_bc62ba18;
DROP INDEX IF EXISTS public.maps_file_file_reference_reference_id_d0f31d94;
DROP INDEX IF EXISTS public.maps_file_file_reference_file_id_fda1266a;
DROP INDEX IF EXISTS public.maps_file_file_map_map_id_9e0bdd7c;
DROP INDEX IF EXISTS public.maps_file_file_map_file_id_c307ffeb;
DROP INDEX IF EXISTS public.django_session_session_key_c0390e0f_like;
DROP INDEX IF EXISTS public.django_session_expire_date_a5c62663;
DROP INDEX IF EXISTS public.django_admin_log_user_id_c564eba6;
DROP INDEX IF EXISTS public.django_admin_log_content_type_id_c4bce8eb;
DROP INDEX IF EXISTS public.auth_user_username_6821ab7c_like;
DROP INDEX IF EXISTS public.auth_user_user_permissions_user_id_a95ead1b;
DROP INDEX IF EXISTS public.auth_user_user_permissions_permission_id_1fbb5f2c;
DROP INDEX IF EXISTS public.auth_user_groups_user_id_6a12ed8b;
DROP INDEX IF EXISTS public.auth_user_groups_group_id_97559544;
DROP INDEX IF EXISTS public.auth_permission_content_type_id_2f476e4b;
DROP INDEX IF EXISTS public.auth_group_permissions_permission_id_84c5c92e;
DROP INDEX IF EXISTS public.auth_group_permissions_group_id_b120cbf9;
DROP INDEX IF EXISTS public.auth_group_name_a6ea08ec_like;
ALTER TABLE IF EXISTS ONLY public.maps_type DROP CONSTRAINT IF EXISTS maps_type_pkey;
ALTER TABLE IF EXISTS ONLY public.maps_scan_scan_type DROP CONSTRAINT IF EXISTS maps_scan_scan_type_scan_id_type_id_f92f6b7e_uniq;
ALTER TABLE IF EXISTS ONLY public.maps_scan_scan_type DROP CONSTRAINT IF EXISTS maps_scan_scan_type_pkey;
ALTER TABLE IF EXISTS ONLY public.maps_scan_scan_reference DROP CONSTRAINT IF EXISTS maps_scan_scan_reference_scan_id_reference_id_a6e37230_uniq;
ALTER TABLE IF EXISTS ONLY public.maps_scan_scan_reference DROP CONSTRAINT IF EXISTS maps_scan_scan_reference_pkey;
ALTER TABLE IF EXISTS ONLY public.maps_scan_scan_person DROP CONSTRAINT IF EXISTS maps_scan_scan_person_scan_id_person_id_7dd06cf1_uniq;
ALTER TABLE IF EXISTS ONLY public.maps_scan_scan_person DROP CONSTRAINT IF EXISTS maps_scan_scan_person_pkey;
ALTER TABLE IF EXISTS ONLY public.maps_scan_scan_map DROP CONSTRAINT IF EXISTS maps_scan_scan_map_scan_id_map_id_97630f8f_uniq;
ALTER TABLE IF EXISTS ONLY public.maps_scan_scan_map DROP CONSTRAINT IF EXISTS maps_scan_scan_map_pkey;
ALTER TABLE IF EXISTS ONLY public.maps_scan DROP CONSTRAINT IF EXISTS maps_scan_pkey;
ALTER TABLE IF EXISTS ONLY public.maps_reference_reference_type DROP CONSTRAINT IF EXISTS maps_reference_reference_type_pkey;
ALTER TABLE IF EXISTS ONLY public.maps_reference_reference_type DROP CONSTRAINT IF EXISTS maps_reference_reference_reference_id_type_id_be0389aa_uniq;
ALTER TABLE IF EXISTS ONLY public.maps_reference DROP CONSTRAINT IF EXISTS maps_reference_pkey;
ALTER TABLE IF EXISTS ONLY public.maps_place_place_type DROP CONSTRAINT IF EXISTS maps_place_place_type_place_id_type_id_279cfb12_uniq;
ALTER TABLE IF EXISTS ONLY public.maps_place_place_type DROP CONSTRAINT IF EXISTS maps_place_place_type_pkey;
ALTER TABLE IF EXISTS ONLY public.maps_place DROP CONSTRAINT IF EXISTS maps_place_pkey;
ALTER TABLE IF EXISTS ONLY public.maps_person DROP CONSTRAINT IF EXISTS maps_person_pkey;
ALTER TABLE IF EXISTS ONLY public.maps_person_person_type DROP CONSTRAINT IF EXISTS maps_person_person_type_pkey;
ALTER TABLE IF EXISTS ONLY public.maps_person_person_type DROP CONSTRAINT IF EXISTS maps_person_person_type_person_id_type_id_e4987fe7_uniq;
ALTER TABLE IF EXISTS ONLY public.maps_person_person_institutes DROP CONSTRAINT IF EXISTS maps_person_person_institutes_pkey;
ALTER TABLE IF EXISTS ONLY public.maps_person_person_institutes DROP CONSTRAINT IF EXISTS maps_person_person_insti_person_id_institute_id_dcf6c4ed_uniq;
ALTER TABLE IF EXISTS ONLY public.maps_map DROP CONSTRAINT IF EXISTS maps_map_pkey;
ALTER TABLE IF EXISTS ONLY public.maps_map_map_type DROP CONSTRAINT IF EXISTS maps_map_map_type_pkey;
ALTER TABLE IF EXISTS ONLY public.maps_map_map_type DROP CONSTRAINT IF EXISTS maps_map_map_type_map_id_type_id_7bfe0076_uniq;
ALTER TABLE IF EXISTS ONLY public.maps_map_map_scan DROP CONSTRAINT IF EXISTS maps_map_map_scan_pkey;
ALTER TABLE IF EXISTS ONLY public.maps_map_map_scan DROP CONSTRAINT IF EXISTS maps_map_map_scan_map_id_scan_id_f6124912_uniq;
ALTER TABLE IF EXISTS ONLY public.maps_map_map_references DROP CONSTRAINT IF EXISTS maps_map_map_references_pkey;
ALTER TABLE IF EXISTS ONLY public.maps_map_map_references DROP CONSTRAINT IF EXISTS maps_map_map_references_map_id_reference_id_6d416742_uniq;
ALTER TABLE IF EXISTS ONLY public.maps_map_map_places DROP CONSTRAINT IF EXISTS maps_map_map_places_pkey;
ALTER TABLE IF EXISTS ONLY public.maps_map_map_places DROP CONSTRAINT IF EXISTS maps_map_map_places_map_id_place_id_55c2923d_uniq;
ALTER TABLE IF EXISTS ONLY public.maps_map_map_persons DROP CONSTRAINT IF EXISTS maps_map_map_persons_pkey;
ALTER TABLE IF EXISTS ONLY public.maps_map_map_persons DROP CONSTRAINT IF EXISTS maps_map_map_persons_map_id_person_id_86915b7f_uniq;
ALTER TABLE IF EXISTS ONLY public.maps_map_map_institute DROP CONSTRAINT IF EXISTS maps_map_map_institute_pkey;
ALTER TABLE IF EXISTS ONLY public.maps_map_map_institute DROP CONSTRAINT IF EXISTS maps_map_map_institute_map_id_institute_id_8569aa5c_uniq;
ALTER TABLE IF EXISTS ONLY public.maps_map_map_file DROP CONSTRAINT IF EXISTS maps_map_map_file_pkey;
ALTER TABLE IF EXISTS ONLY public.maps_map_map_file DROP CONSTRAINT IF EXISTS maps_map_map_file_map_id_file_id_0c980a11_uniq;
ALTER TABLE IF EXISTS ONLY public.maps_institute DROP CONSTRAINT IF EXISTS maps_institute_pkey;
ALTER TABLE IF EXISTS ONLY public.maps_institute_institute_type DROP CONSTRAINT IF EXISTS maps_institute_institute_type_pkey;
ALTER TABLE IF EXISTS ONLY public.maps_institute_institute_type DROP CONSTRAINT IF EXISTS maps_institute_institute_institute_id_type_id_4ff99b12_uniq;
ALTER TABLE IF EXISTS ONLY public.maps_file DROP CONSTRAINT IF EXISTS maps_file_pkey;
ALTER TABLE IF EXISTS ONLY public.maps_file_file_type DROP CONSTRAINT IF EXISTS maps_file_file_type_pkey;
ALTER TABLE IF EXISTS ONLY public.maps_file_file_type DROP CONSTRAINT IF EXISTS maps_file_file_type_file_id_type_id_efbea730_uniq;
ALTER TABLE IF EXISTS ONLY public.maps_file_file_reference DROP CONSTRAINT IF EXISTS maps_file_file_reference_pkey;
ALTER TABLE IF EXISTS ONLY public.maps_file_file_reference DROP CONSTRAINT IF EXISTS maps_file_file_reference_file_id_reference_id_b9cece58_uniq;
ALTER TABLE IF EXISTS ONLY public.maps_file_file_map DROP CONSTRAINT IF EXISTS maps_file_file_map_pkey;
ALTER TABLE IF EXISTS ONLY public.maps_file_file_map DROP CONSTRAINT IF EXISTS maps_file_file_map_file_id_map_id_ff59351d_uniq;
ALTER TABLE IF EXISTS ONLY public.django_session DROP CONSTRAINT IF EXISTS django_session_pkey;
ALTER TABLE IF EXISTS ONLY public.django_migrations DROP CONSTRAINT IF EXISTS django_migrations_pkey;
ALTER TABLE IF EXISTS ONLY public.django_content_type DROP CONSTRAINT IF EXISTS django_content_type_pkey;
ALTER TABLE IF EXISTS ONLY public.django_content_type DROP CONSTRAINT IF EXISTS django_content_type_app_label_model_76bd3d3b_uniq;
ALTER TABLE IF EXISTS ONLY public.django_admin_log DROP CONSTRAINT IF EXISTS django_admin_log_pkey;
ALTER TABLE IF EXISTS ONLY public.auth_user DROP CONSTRAINT IF EXISTS auth_user_username_key;
ALTER TABLE IF EXISTS ONLY public.auth_user_user_permissions DROP CONSTRAINT IF EXISTS auth_user_user_permissions_user_id_permission_id_14a6b632_uniq;
ALTER TABLE IF EXISTS ONLY public.auth_user_user_permissions DROP CONSTRAINT IF EXISTS auth_user_user_permissions_pkey;
ALTER TABLE IF EXISTS ONLY public.auth_user DROP CONSTRAINT IF EXISTS auth_user_pkey;
ALTER TABLE IF EXISTS ONLY public.auth_user_groups DROP CONSTRAINT IF EXISTS auth_user_groups_user_id_group_id_94350c0c_uniq;
ALTER TABLE IF EXISTS ONLY public.auth_user_groups DROP CONSTRAINT IF EXISTS auth_user_groups_pkey;
ALTER TABLE IF EXISTS ONLY public.auth_permission DROP CONSTRAINT IF EXISTS auth_permission_pkey;
ALTER TABLE IF EXISTS ONLY public.auth_permission DROP CONSTRAINT IF EXISTS auth_permission_content_type_id_codename_01ab375a_uniq;
ALTER TABLE IF EXISTS ONLY public.auth_group DROP CONSTRAINT IF EXISTS auth_group_pkey;
ALTER TABLE IF EXISTS ONLY public.auth_group_permissions DROP CONSTRAINT IF EXISTS auth_group_permissions_pkey;
ALTER TABLE IF EXISTS ONLY public.auth_group_permissions DROP CONSTRAINT IF EXISTS auth_group_permissions_group_id_permission_id_0cd325b0_uniq;
ALTER TABLE IF EXISTS ONLY public.auth_group DROP CONSTRAINT IF EXISTS auth_group_name_key;
ALTER TABLE IF EXISTS public.maps_type ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.maps_scan_scan_type ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.maps_scan_scan_reference ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.maps_scan_scan_person ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.maps_scan_scan_map ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.maps_scan ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.maps_reference_reference_type ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.maps_reference ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.maps_place_place_type ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.maps_place ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.maps_person_person_type ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.maps_person_person_institutes ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.maps_person ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.maps_map_map_type ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.maps_map_map_scan ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.maps_map_map_references ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.maps_map_map_places ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.maps_map_map_persons ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.maps_map_map_institute ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.maps_map_map_file ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.maps_map ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.maps_institute_institute_type ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.maps_institute ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.maps_file_file_type ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.maps_file_file_reference ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.maps_file_file_map ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.maps_file ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.django_migrations ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.django_content_type ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.django_admin_log ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.auth_user_user_permissions ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.auth_user_groups ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.auth_user ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.auth_permission ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.auth_group_permissions ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.auth_group ALTER COLUMN id DROP DEFAULT;
DROP SEQUENCE IF EXISTS public.maps_type_id_seq;
DROP TABLE IF EXISTS public.maps_type;
DROP SEQUENCE IF EXISTS public.maps_scan_scan_type_id_seq;
DROP TABLE IF EXISTS public.maps_scan_scan_type;
DROP SEQUENCE IF EXISTS public.maps_scan_scan_reference_id_seq;
DROP TABLE IF EXISTS public.maps_scan_scan_reference;
DROP SEQUENCE IF EXISTS public.maps_scan_scan_person_id_seq;
DROP TABLE IF EXISTS public.maps_scan_scan_person;
DROP SEQUENCE IF EXISTS public.maps_scan_scan_map_id_seq;
DROP TABLE IF EXISTS public.maps_scan_scan_map;
DROP SEQUENCE IF EXISTS public.maps_scan_id_seq;
DROP TABLE IF EXISTS public.maps_scan;
DROP SEQUENCE IF EXISTS public.maps_reference_reference_type_id_seq;
DROP TABLE IF EXISTS public.maps_reference_reference_type;
DROP SEQUENCE IF EXISTS public.maps_reference_id_seq;
DROP TABLE IF EXISTS public.maps_reference;
DROP SEQUENCE IF EXISTS public.maps_place_place_type_id_seq;
DROP TABLE IF EXISTS public.maps_place_place_type;
DROP SEQUENCE IF EXISTS public.maps_place_id_seq;
DROP TABLE IF EXISTS public.maps_place;
DROP SEQUENCE IF EXISTS public.maps_person_person_type_id_seq;
DROP TABLE IF EXISTS public.maps_person_person_type;
DROP SEQUENCE IF EXISTS public.maps_person_person_institutes_id_seq;
DROP TABLE IF EXISTS public.maps_person_person_institutes;
DROP SEQUENCE IF EXISTS public.maps_person_id_seq;
DROP TABLE IF EXISTS public.maps_person;
DROP SEQUENCE IF EXISTS public.maps_map_map_type_id_seq;
DROP TABLE IF EXISTS public.maps_map_map_type;
DROP SEQUENCE IF EXISTS public.maps_map_map_scan_id_seq;
DROP TABLE IF EXISTS public.maps_map_map_scan;
DROP SEQUENCE IF EXISTS public.maps_map_map_references_id_seq;
DROP TABLE IF EXISTS public.maps_map_map_references;
DROP SEQUENCE IF EXISTS public.maps_map_map_places_id_seq;
DROP TABLE IF EXISTS public.maps_map_map_places;
DROP SEQUENCE IF EXISTS public.maps_map_map_persons_id_seq;
DROP TABLE IF EXISTS public.maps_map_map_persons;
DROP SEQUENCE IF EXISTS public.maps_map_map_institute_id_seq;
DROP TABLE IF EXISTS public.maps_map_map_institute;
DROP SEQUENCE IF EXISTS public.maps_map_map_file_id_seq;
DROP TABLE IF EXISTS public.maps_map_map_file;
DROP SEQUENCE IF EXISTS public.maps_map_id_seq;
DROP TABLE IF EXISTS public.maps_map;
DROP SEQUENCE IF EXISTS public.maps_institute_institute_type_id_seq;
DROP TABLE IF EXISTS public.maps_institute_institute_type;
DROP SEQUENCE IF EXISTS public.maps_institute_id_seq;
DROP TABLE IF EXISTS public.maps_institute;
DROP SEQUENCE IF EXISTS public.maps_file_id_seq;
DROP SEQUENCE IF EXISTS public.maps_file_file_type_id_seq;
DROP TABLE IF EXISTS public.maps_file_file_type;
DROP SEQUENCE IF EXISTS public.maps_file_file_reference_id_seq;
DROP TABLE IF EXISTS public.maps_file_file_reference;
DROP SEQUENCE IF EXISTS public.maps_file_file_map_id_seq;
DROP TABLE IF EXISTS public.maps_file_file_map;
DROP TABLE IF EXISTS public.maps_file;
DROP TABLE IF EXISTS public.django_session;
DROP SEQUENCE IF EXISTS public.django_migrations_id_seq;
DROP TABLE IF EXISTS public.django_migrations;
DROP SEQUENCE IF EXISTS public.django_content_type_id_seq;
DROP TABLE IF EXISTS public.django_content_type;
DROP SEQUENCE IF EXISTS public.django_admin_log_id_seq;
DROP TABLE IF EXISTS public.django_admin_log;
DROP SEQUENCE IF EXISTS public.auth_user_user_permissions_id_seq;
DROP TABLE IF EXISTS public.auth_user_user_permissions;
DROP SEQUENCE IF EXISTS public.auth_user_id_seq;
DROP SEQUENCE IF EXISTS public.auth_user_groups_id_seq;
DROP TABLE IF EXISTS public.auth_user_groups;
DROP TABLE IF EXISTS public.auth_user;
DROP SEQUENCE IF EXISTS public.auth_permission_id_seq;
DROP TABLE IF EXISTS public.auth_permission;
DROP SEQUENCE IF EXISTS public.auth_group_permissions_id_seq;
DROP TABLE IF EXISTS public.auth_group_permissions;
DROP SEQUENCE IF EXISTS public.auth_group_id_seq;
DROP TABLE IF EXISTS public.auth_group;
DROP EXTENSION IF EXISTS postgis;
--
-- Name: postgis; Type: EXTENSION; Schema: -; Owner: 
--

CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA public;


--
-- Name: EXTENSION postgis; Type: COMMENT; Schema: -; Owner: 
--

COMMENT ON EXTENSION postgis IS 'PostGIS geometry, geography, and raster spatial types and functions';


SET default_tablespace = '';

SET default_with_oids = false;

--
-- Name: auth_group; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.auth_group (
    id integer NOT NULL,
    name character varying(80) NOT NULL
);


ALTER TABLE public.auth_group OWNER TO diauma;

--
-- Name: auth_group_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.auth_group_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.auth_group_id_seq OWNER TO diauma;

--
-- Name: auth_group_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.auth_group_id_seq OWNED BY public.auth_group.id;


--
-- Name: auth_group_permissions; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.auth_group_permissions (
    id integer NOT NULL,
    group_id integer NOT NULL,
    permission_id integer NOT NULL
);


ALTER TABLE public.auth_group_permissions OWNER TO diauma;

--
-- Name: auth_group_permissions_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.auth_group_permissions_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.auth_group_permissions_id_seq OWNER TO diauma;

--
-- Name: auth_group_permissions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.auth_group_permissions_id_seq OWNED BY public.auth_group_permissions.id;


--
-- Name: auth_permission; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.auth_permission (
    id integer NOT NULL,
    name character varying(255) NOT NULL,
    content_type_id integer NOT NULL,
    codename character varying(100) NOT NULL
);


ALTER TABLE public.auth_permission OWNER TO diauma;

--
-- Name: auth_permission_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.auth_permission_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.auth_permission_id_seq OWNER TO diauma;

--
-- Name: auth_permission_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.auth_permission_id_seq OWNED BY public.auth_permission.id;


--
-- Name: auth_user; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.auth_user (
    id integer NOT NULL,
    password character varying(128) NOT NULL,
    last_login timestamp with time zone,
    is_superuser boolean NOT NULL,
    username character varying(150) NOT NULL,
    first_name character varying(30) NOT NULL,
    last_name character varying(150) NOT NULL,
    email character varying(254) NOT NULL,
    is_staff boolean NOT NULL,
    is_active boolean NOT NULL,
    date_joined timestamp with time zone NOT NULL
);


ALTER TABLE public.auth_user OWNER TO diauma;

--
-- Name: auth_user_groups; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.auth_user_groups (
    id integer NOT NULL,
    user_id integer NOT NULL,
    group_id integer NOT NULL
);


ALTER TABLE public.auth_user_groups OWNER TO diauma;

--
-- Name: auth_user_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.auth_user_groups_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.auth_user_groups_id_seq OWNER TO diauma;

--
-- Name: auth_user_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.auth_user_groups_id_seq OWNED BY public.auth_user_groups.id;


--
-- Name: auth_user_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.auth_user_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.auth_user_id_seq OWNER TO diauma;

--
-- Name: auth_user_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.auth_user_id_seq OWNED BY public.auth_user.id;


--
-- Name: auth_user_user_permissions; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.auth_user_user_permissions (
    id integer NOT NULL,
    user_id integer NOT NULL,
    permission_id integer NOT NULL
);


ALTER TABLE public.auth_user_user_permissions OWNER TO diauma;

--
-- Name: auth_user_user_permissions_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.auth_user_user_permissions_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.auth_user_user_permissions_id_seq OWNER TO diauma;

--
-- Name: auth_user_user_permissions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.auth_user_user_permissions_id_seq OWNED BY public.auth_user_user_permissions.id;


--
-- Name: django_admin_log; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.django_admin_log (
    id integer NOT NULL,
    action_time timestamp with time zone NOT NULL,
    object_id text,
    object_repr character varying(200) NOT NULL,
    action_flag smallint NOT NULL,
    change_message text NOT NULL,
    content_type_id integer,
    user_id integer NOT NULL,
    CONSTRAINT django_admin_log_action_flag_check CHECK ((action_flag >= 0))
);


ALTER TABLE public.django_admin_log OWNER TO diauma;

--
-- Name: django_admin_log_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.django_admin_log_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.django_admin_log_id_seq OWNER TO diauma;

--
-- Name: django_admin_log_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.django_admin_log_id_seq OWNED BY public.django_admin_log.id;


--
-- Name: django_content_type; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.django_content_type (
    id integer NOT NULL,
    app_label character varying(100) NOT NULL,
    model character varying(100) NOT NULL
);


ALTER TABLE public.django_content_type OWNER TO diauma;

--
-- Name: django_content_type_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.django_content_type_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.django_content_type_id_seq OWNER TO diauma;

--
-- Name: django_content_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.django_content_type_id_seq OWNED BY public.django_content_type.id;


--
-- Name: django_migrations; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.django_migrations (
    id integer NOT NULL,
    app character varying(255) NOT NULL,
    name character varying(255) NOT NULL,
    applied timestamp with time zone NOT NULL
);


ALTER TABLE public.django_migrations OWNER TO diauma;

--
-- Name: django_migrations_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.django_migrations_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.django_migrations_id_seq OWNER TO diauma;

--
-- Name: django_migrations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.django_migrations_id_seq OWNED BY public.django_migrations.id;


--
-- Name: django_session; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.django_session (
    session_key character varying(40) NOT NULL,
    session_data text NOT NULL,
    expire_date timestamp with time zone NOT NULL
);


ALTER TABLE public.django_session OWNER TO diauma;

--
-- Name: maps_file; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.maps_file (
    id integer NOT NULL,
    created_date timestamp with time zone NOT NULL,
    modified_date timestamp with time zone NOT NULL,
    name character varying(255) NOT NULL,
    file character varying(100) NOT NULL,
    info text NOT NULL
);


ALTER TABLE public.maps_file OWNER TO diauma;

--
-- Name: maps_file_file_map; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.maps_file_file_map (
    id integer NOT NULL,
    file_id integer NOT NULL,
    map_id integer NOT NULL
);


ALTER TABLE public.maps_file_file_map OWNER TO diauma;

--
-- Name: maps_file_file_map_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.maps_file_file_map_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maps_file_file_map_id_seq OWNER TO diauma;

--
-- Name: maps_file_file_map_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.maps_file_file_map_id_seq OWNED BY public.maps_file_file_map.id;


--
-- Name: maps_file_file_reference; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.maps_file_file_reference (
    id integer NOT NULL,
    file_id integer NOT NULL,
    reference_id integer NOT NULL
);


ALTER TABLE public.maps_file_file_reference OWNER TO diauma;

--
-- Name: maps_file_file_reference_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.maps_file_file_reference_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maps_file_file_reference_id_seq OWNER TO diauma;

--
-- Name: maps_file_file_reference_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.maps_file_file_reference_id_seq OWNED BY public.maps_file_file_reference.id;


--
-- Name: maps_file_file_type; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.maps_file_file_type (
    id integer NOT NULL,
    file_id integer NOT NULL,
    type_id integer NOT NULL
);


ALTER TABLE public.maps_file_file_type OWNER TO diauma;

--
-- Name: maps_file_file_type_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.maps_file_file_type_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maps_file_file_type_id_seq OWNER TO diauma;

--
-- Name: maps_file_file_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.maps_file_file_type_id_seq OWNED BY public.maps_file_file_type.id;


--
-- Name: maps_file_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.maps_file_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maps_file_id_seq OWNER TO diauma;

--
-- Name: maps_file_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.maps_file_id_seq OWNED BY public.maps_file.id;


--
-- Name: maps_institute; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.maps_institute (
    id integer NOT NULL,
    created_date timestamp with time zone NOT NULL,
    modified_date timestamp with time zone NOT NULL,
    name character varying(255) NOT NULL,
    info text NOT NULL,
    institute_location_id integer
);


ALTER TABLE public.maps_institute OWNER TO diauma;

--
-- Name: maps_institute_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.maps_institute_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maps_institute_id_seq OWNER TO diauma;

--
-- Name: maps_institute_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.maps_institute_id_seq OWNED BY public.maps_institute.id;


--
-- Name: maps_institute_institute_type; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.maps_institute_institute_type (
    id integer NOT NULL,
    institute_id integer NOT NULL,
    type_id integer NOT NULL
);


ALTER TABLE public.maps_institute_institute_type OWNER TO diauma;

--
-- Name: maps_institute_institute_type_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.maps_institute_institute_type_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maps_institute_institute_type_id_seq OWNER TO diauma;

--
-- Name: maps_institute_institute_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.maps_institute_institute_type_id_seq OWNED BY public.maps_institute_institute_type.id;


--
-- Name: maps_map; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.maps_map (
    id integer NOT NULL,
    created_date timestamp with time zone NOT NULL,
    modified_date timestamp with time zone NOT NULL,
    name character varying(255) NOT NULL,
    title character varying(255) NOT NULL,
    info text NOT NULL,
    scale integer,
    width double precision,
    height double precision,
    date_created date,
    date_created2 date,
    date_content date,
    date_content2 date,
    map_base_id integer,
    map_copy_id integer,
    map_issued_id integer,
    map_location_id integer,
    map_id character varying(255)
);


ALTER TABLE public.maps_map OWNER TO diauma;

--
-- Name: maps_map_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.maps_map_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maps_map_id_seq OWNER TO diauma;

--
-- Name: maps_map_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.maps_map_id_seq OWNED BY public.maps_map.id;


--
-- Name: maps_map_map_file; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.maps_map_map_file (
    id integer NOT NULL,
    map_id integer NOT NULL,
    file_id integer NOT NULL
);


ALTER TABLE public.maps_map_map_file OWNER TO diauma;

--
-- Name: maps_map_map_file_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.maps_map_map_file_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maps_map_map_file_id_seq OWNER TO diauma;

--
-- Name: maps_map_map_file_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.maps_map_map_file_id_seq OWNED BY public.maps_map_map_file.id;


--
-- Name: maps_map_map_institute; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.maps_map_map_institute (
    id integer NOT NULL,
    map_id integer NOT NULL,
    institute_id integer NOT NULL
);


ALTER TABLE public.maps_map_map_institute OWNER TO diauma;

--
-- Name: maps_map_map_institute_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.maps_map_map_institute_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maps_map_map_institute_id_seq OWNER TO diauma;

--
-- Name: maps_map_map_institute_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.maps_map_map_institute_id_seq OWNED BY public.maps_map_map_institute.id;


--
-- Name: maps_map_map_persons; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.maps_map_map_persons (
    id integer NOT NULL,
    map_id integer NOT NULL,
    person_id integer NOT NULL
);


ALTER TABLE public.maps_map_map_persons OWNER TO diauma;

--
-- Name: maps_map_map_persons_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.maps_map_map_persons_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maps_map_map_persons_id_seq OWNER TO diauma;

--
-- Name: maps_map_map_persons_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.maps_map_map_persons_id_seq OWNED BY public.maps_map_map_persons.id;


--
-- Name: maps_map_map_places; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.maps_map_map_places (
    id integer NOT NULL,
    map_id integer NOT NULL,
    place_id integer NOT NULL
);


ALTER TABLE public.maps_map_map_places OWNER TO diauma;

--
-- Name: maps_map_map_places_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.maps_map_map_places_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maps_map_map_places_id_seq OWNER TO diauma;

--
-- Name: maps_map_map_places_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.maps_map_map_places_id_seq OWNED BY public.maps_map_map_places.id;


--
-- Name: maps_map_map_references; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.maps_map_map_references (
    id integer NOT NULL,
    map_id integer NOT NULL,
    reference_id integer NOT NULL
);


ALTER TABLE public.maps_map_map_references OWNER TO diauma;

--
-- Name: maps_map_map_references_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.maps_map_map_references_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maps_map_map_references_id_seq OWNER TO diauma;

--
-- Name: maps_map_map_references_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.maps_map_map_references_id_seq OWNED BY public.maps_map_map_references.id;


--
-- Name: maps_map_map_scan; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.maps_map_map_scan (
    id integer NOT NULL,
    map_id integer NOT NULL,
    scan_id integer NOT NULL
);


ALTER TABLE public.maps_map_map_scan OWNER TO diauma;

--
-- Name: maps_map_map_scan_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.maps_map_map_scan_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maps_map_map_scan_id_seq OWNER TO diauma;

--
-- Name: maps_map_map_scan_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.maps_map_map_scan_id_seq OWNED BY public.maps_map_map_scan.id;


--
-- Name: maps_map_map_type; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.maps_map_map_type (
    id integer NOT NULL,
    map_id integer NOT NULL,
    type_id integer NOT NULL
);


ALTER TABLE public.maps_map_map_type OWNER TO diauma;

--
-- Name: maps_map_map_type_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.maps_map_map_type_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maps_map_map_type_id_seq OWNER TO diauma;

--
-- Name: maps_map_map_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.maps_map_map_type_id_seq OWNED BY public.maps_map_map_type.id;


--
-- Name: maps_person; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.maps_person (
    id integer NOT NULL,
    created_date timestamp with time zone NOT NULL,
    modified_date timestamp with time zone NOT NULL,
    name character varying(255) NOT NULL,
    info text NOT NULL,
    person_location_id integer,
    date_begin date,
    date_end date,
    gnd_id integer
);


ALTER TABLE public.maps_person OWNER TO diauma;

--
-- Name: maps_person_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.maps_person_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maps_person_id_seq OWNER TO diauma;

--
-- Name: maps_person_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.maps_person_id_seq OWNED BY public.maps_person.id;


--
-- Name: maps_person_person_institutes; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.maps_person_person_institutes (
    id integer NOT NULL,
    person_id integer NOT NULL,
    institute_id integer NOT NULL
);


ALTER TABLE public.maps_person_person_institutes OWNER TO diauma;

--
-- Name: maps_person_person_institutes_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.maps_person_person_institutes_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maps_person_person_institutes_id_seq OWNER TO diauma;

--
-- Name: maps_person_person_institutes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.maps_person_person_institutes_id_seq OWNED BY public.maps_person_person_institutes.id;


--
-- Name: maps_person_person_type; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.maps_person_person_type (
    id integer NOT NULL,
    person_id integer NOT NULL,
    type_id integer NOT NULL
);


ALTER TABLE public.maps_person_person_type OWNER TO diauma;

--
-- Name: maps_person_person_type_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.maps_person_person_type_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maps_person_person_type_id_seq OWNER TO diauma;

--
-- Name: maps_person_person_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.maps_person_person_type_id_seq OWNED BY public.maps_person_person_type.id;


--
-- Name: maps_place; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.maps_place (
    id integer NOT NULL,
    created_date timestamp with time zone NOT NULL,
    modified_date timestamp with time zone NOT NULL,
    name character varying(255) NOT NULL,
    info text NOT NULL,
    modern_name character varying(255) NOT NULL,
    geonames_id integer
);


ALTER TABLE public.maps_place OWNER TO diauma;

--
-- Name: maps_place_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.maps_place_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maps_place_id_seq OWNER TO diauma;

--
-- Name: maps_place_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.maps_place_id_seq OWNED BY public.maps_place.id;


--
-- Name: maps_place_place_type; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.maps_place_place_type (
    id integer NOT NULL,
    place_id integer NOT NULL,
    type_id integer NOT NULL
);


ALTER TABLE public.maps_place_place_type OWNER TO diauma;

--
-- Name: maps_place_place_type_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.maps_place_place_type_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maps_place_place_type_id_seq OWNER TO diauma;

--
-- Name: maps_place_place_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.maps_place_place_type_id_seq OWNED BY public.maps_place_place_type.id;


--
-- Name: maps_reference; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.maps_reference (
    id integer NOT NULL,
    created_date timestamp with time zone NOT NULL,
    modified_date timestamp with time zone NOT NULL,
    name character varying(255) NOT NULL,
    info text NOT NULL,
    super_id integer
);


ALTER TABLE public.maps_reference OWNER TO diauma;

--
-- Name: maps_reference_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.maps_reference_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maps_reference_id_seq OWNER TO diauma;

--
-- Name: maps_reference_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.maps_reference_id_seq OWNED BY public.maps_reference.id;


--
-- Name: maps_reference_reference_type; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.maps_reference_reference_type (
    id integer NOT NULL,
    reference_id integer NOT NULL,
    type_id integer NOT NULL
);


ALTER TABLE public.maps_reference_reference_type OWNER TO diauma;

--
-- Name: maps_reference_reference_type_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.maps_reference_reference_type_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maps_reference_reference_type_id_seq OWNER TO diauma;

--
-- Name: maps_reference_reference_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.maps_reference_reference_type_id_seq OWNED BY public.maps_reference_reference_type.id;


--
-- Name: maps_scan; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.maps_scan (
    id integer NOT NULL,
    created_date timestamp with time zone NOT NULL,
    modified_date timestamp with time zone NOT NULL,
    name character varying(255) NOT NULL,
    file character varying(100) NOT NULL,
    info text NOT NULL,
    scan_date date
);


ALTER TABLE public.maps_scan OWNER TO diauma;

--
-- Name: maps_scan_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.maps_scan_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maps_scan_id_seq OWNER TO diauma;

--
-- Name: maps_scan_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.maps_scan_id_seq OWNED BY public.maps_scan.id;


--
-- Name: maps_scan_scan_map; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.maps_scan_scan_map (
    id integer NOT NULL,
    scan_id integer NOT NULL,
    map_id integer NOT NULL
);


ALTER TABLE public.maps_scan_scan_map OWNER TO diauma;

--
-- Name: maps_scan_scan_map_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.maps_scan_scan_map_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maps_scan_scan_map_id_seq OWNER TO diauma;

--
-- Name: maps_scan_scan_map_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.maps_scan_scan_map_id_seq OWNED BY public.maps_scan_scan_map.id;


--
-- Name: maps_scan_scan_person; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.maps_scan_scan_person (
    id integer NOT NULL,
    scan_id integer NOT NULL,
    person_id integer NOT NULL
);


ALTER TABLE public.maps_scan_scan_person OWNER TO diauma;

--
-- Name: maps_scan_scan_person_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.maps_scan_scan_person_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maps_scan_scan_person_id_seq OWNER TO diauma;

--
-- Name: maps_scan_scan_person_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.maps_scan_scan_person_id_seq OWNED BY public.maps_scan_scan_person.id;


--
-- Name: maps_scan_scan_reference; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.maps_scan_scan_reference (
    id integer NOT NULL,
    scan_id integer NOT NULL,
    reference_id integer NOT NULL
);


ALTER TABLE public.maps_scan_scan_reference OWNER TO diauma;

--
-- Name: maps_scan_scan_reference_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.maps_scan_scan_reference_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maps_scan_scan_reference_id_seq OWNER TO diauma;

--
-- Name: maps_scan_scan_reference_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.maps_scan_scan_reference_id_seq OWNED BY public.maps_scan_scan_reference.id;


--
-- Name: maps_scan_scan_type; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.maps_scan_scan_type (
    id integer NOT NULL,
    scan_id integer NOT NULL,
    type_id integer NOT NULL
);


ALTER TABLE public.maps_scan_scan_type OWNER TO diauma;

--
-- Name: maps_scan_scan_type_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.maps_scan_scan_type_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maps_scan_scan_type_id_seq OWNER TO diauma;

--
-- Name: maps_scan_scan_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.maps_scan_scan_type_id_seq OWNED BY public.maps_scan_scan_type.id;


--
-- Name: maps_type; Type: TABLE; Schema: public; Owner: diauma
--

CREATE TABLE public.maps_type (
    id integer NOT NULL,
    name character varying(250) NOT NULL,
    lft integer NOT NULL,
    rght integer NOT NULL,
    tree_id integer NOT NULL,
    level integer NOT NULL,
    parent_id integer,
    info text NOT NULL,
    CONSTRAINT maps_type_level_check CHECK ((level >= 0)),
    CONSTRAINT maps_type_lft_check CHECK ((lft >= 0)),
    CONSTRAINT maps_type_rght_check CHECK ((rght >= 0)),
    CONSTRAINT maps_type_tree_id_check CHECK ((tree_id >= 0))
);


ALTER TABLE public.maps_type OWNER TO diauma;

--
-- Name: maps_type_id_seq; Type: SEQUENCE; Schema: public; Owner: diauma
--

CREATE SEQUENCE public.maps_type_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.maps_type_id_seq OWNER TO diauma;

--
-- Name: maps_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: diauma
--

ALTER SEQUENCE public.maps_type_id_seq OWNED BY public.maps_type.id;


--
-- Name: auth_group id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.auth_group ALTER COLUMN id SET DEFAULT nextval('public.auth_group_id_seq'::regclass);


--
-- Name: auth_group_permissions id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.auth_group_permissions ALTER COLUMN id SET DEFAULT nextval('public.auth_group_permissions_id_seq'::regclass);


--
-- Name: auth_permission id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.auth_permission ALTER COLUMN id SET DEFAULT nextval('public.auth_permission_id_seq'::regclass);


--
-- Name: auth_user id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.auth_user ALTER COLUMN id SET DEFAULT nextval('public.auth_user_id_seq'::regclass);


--
-- Name: auth_user_groups id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.auth_user_groups ALTER COLUMN id SET DEFAULT nextval('public.auth_user_groups_id_seq'::regclass);


--
-- Name: auth_user_user_permissions id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.auth_user_user_permissions ALTER COLUMN id SET DEFAULT nextval('public.auth_user_user_permissions_id_seq'::regclass);


--
-- Name: django_admin_log id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.django_admin_log ALTER COLUMN id SET DEFAULT nextval('public.django_admin_log_id_seq'::regclass);


--
-- Name: django_content_type id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.django_content_type ALTER COLUMN id SET DEFAULT nextval('public.django_content_type_id_seq'::regclass);


--
-- Name: django_migrations id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.django_migrations ALTER COLUMN id SET DEFAULT nextval('public.django_migrations_id_seq'::regclass);


--
-- Name: maps_file id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_file ALTER COLUMN id SET DEFAULT nextval('public.maps_file_id_seq'::regclass);


--
-- Name: maps_file_file_map id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_file_file_map ALTER COLUMN id SET DEFAULT nextval('public.maps_file_file_map_id_seq'::regclass);


--
-- Name: maps_file_file_reference id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_file_file_reference ALTER COLUMN id SET DEFAULT nextval('public.maps_file_file_reference_id_seq'::regclass);


--
-- Name: maps_file_file_type id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_file_file_type ALTER COLUMN id SET DEFAULT nextval('public.maps_file_file_type_id_seq'::regclass);


--
-- Name: maps_institute id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_institute ALTER COLUMN id SET DEFAULT nextval('public.maps_institute_id_seq'::regclass);


--
-- Name: maps_institute_institute_type id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_institute_institute_type ALTER COLUMN id SET DEFAULT nextval('public.maps_institute_institute_type_id_seq'::regclass);


--
-- Name: maps_map id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map ALTER COLUMN id SET DEFAULT nextval('public.maps_map_id_seq'::regclass);


--
-- Name: maps_map_map_file id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_file ALTER COLUMN id SET DEFAULT nextval('public.maps_map_map_file_id_seq'::regclass);


--
-- Name: maps_map_map_institute id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_institute ALTER COLUMN id SET DEFAULT nextval('public.maps_map_map_institute_id_seq'::regclass);


--
-- Name: maps_map_map_persons id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_persons ALTER COLUMN id SET DEFAULT nextval('public.maps_map_map_persons_id_seq'::regclass);


--
-- Name: maps_map_map_places id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_places ALTER COLUMN id SET DEFAULT nextval('public.maps_map_map_places_id_seq'::regclass);


--
-- Name: maps_map_map_references id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_references ALTER COLUMN id SET DEFAULT nextval('public.maps_map_map_references_id_seq'::regclass);


--
-- Name: maps_map_map_scan id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_scan ALTER COLUMN id SET DEFAULT nextval('public.maps_map_map_scan_id_seq'::regclass);


--
-- Name: maps_map_map_type id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_type ALTER COLUMN id SET DEFAULT nextval('public.maps_map_map_type_id_seq'::regclass);


--
-- Name: maps_person id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_person ALTER COLUMN id SET DEFAULT nextval('public.maps_person_id_seq'::regclass);


--
-- Name: maps_person_person_institutes id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_person_person_institutes ALTER COLUMN id SET DEFAULT nextval('public.maps_person_person_institutes_id_seq'::regclass);


--
-- Name: maps_person_person_type id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_person_person_type ALTER COLUMN id SET DEFAULT nextval('public.maps_person_person_type_id_seq'::regclass);


--
-- Name: maps_place id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_place ALTER COLUMN id SET DEFAULT nextval('public.maps_place_id_seq'::regclass);


--
-- Name: maps_place_place_type id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_place_place_type ALTER COLUMN id SET DEFAULT nextval('public.maps_place_place_type_id_seq'::regclass);


--
-- Name: maps_reference id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_reference ALTER COLUMN id SET DEFAULT nextval('public.maps_reference_id_seq'::regclass);


--
-- Name: maps_reference_reference_type id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_reference_reference_type ALTER COLUMN id SET DEFAULT nextval('public.maps_reference_reference_type_id_seq'::regclass);


--
-- Name: maps_scan id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_scan ALTER COLUMN id SET DEFAULT nextval('public.maps_scan_id_seq'::regclass);


--
-- Name: maps_scan_scan_map id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_scan_scan_map ALTER COLUMN id SET DEFAULT nextval('public.maps_scan_scan_map_id_seq'::regclass);


--
-- Name: maps_scan_scan_person id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_scan_scan_person ALTER COLUMN id SET DEFAULT nextval('public.maps_scan_scan_person_id_seq'::regclass);


--
-- Name: maps_scan_scan_reference id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_scan_scan_reference ALTER COLUMN id SET DEFAULT nextval('public.maps_scan_scan_reference_id_seq'::regclass);


--
-- Name: maps_scan_scan_type id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_scan_scan_type ALTER COLUMN id SET DEFAULT nextval('public.maps_scan_scan_type_id_seq'::regclass);


--
-- Name: maps_type id; Type: DEFAULT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_type ALTER COLUMN id SET DEFAULT nextval('public.maps_type_id_seq'::regclass);


--
-- Name: auth_group auth_group_name_key; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.auth_group
    ADD CONSTRAINT auth_group_name_key UNIQUE (name);


--
-- Name: auth_group_permissions auth_group_permissions_group_id_permission_id_0cd325b0_uniq; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.auth_group_permissions
    ADD CONSTRAINT auth_group_permissions_group_id_permission_id_0cd325b0_uniq UNIQUE (group_id, permission_id);


--
-- Name: auth_group_permissions auth_group_permissions_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.auth_group_permissions
    ADD CONSTRAINT auth_group_permissions_pkey PRIMARY KEY (id);


--
-- Name: auth_group auth_group_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.auth_group
    ADD CONSTRAINT auth_group_pkey PRIMARY KEY (id);


--
-- Name: auth_permission auth_permission_content_type_id_codename_01ab375a_uniq; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.auth_permission
    ADD CONSTRAINT auth_permission_content_type_id_codename_01ab375a_uniq UNIQUE (content_type_id, codename);


--
-- Name: auth_permission auth_permission_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.auth_permission
    ADD CONSTRAINT auth_permission_pkey PRIMARY KEY (id);


--
-- Name: auth_user_groups auth_user_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.auth_user_groups
    ADD CONSTRAINT auth_user_groups_pkey PRIMARY KEY (id);


--
-- Name: auth_user_groups auth_user_groups_user_id_group_id_94350c0c_uniq; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.auth_user_groups
    ADD CONSTRAINT auth_user_groups_user_id_group_id_94350c0c_uniq UNIQUE (user_id, group_id);


--
-- Name: auth_user auth_user_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.auth_user
    ADD CONSTRAINT auth_user_pkey PRIMARY KEY (id);


--
-- Name: auth_user_user_permissions auth_user_user_permissions_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.auth_user_user_permissions
    ADD CONSTRAINT auth_user_user_permissions_pkey PRIMARY KEY (id);


--
-- Name: auth_user_user_permissions auth_user_user_permissions_user_id_permission_id_14a6b632_uniq; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.auth_user_user_permissions
    ADD CONSTRAINT auth_user_user_permissions_user_id_permission_id_14a6b632_uniq UNIQUE (user_id, permission_id);


--
-- Name: auth_user auth_user_username_key; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.auth_user
    ADD CONSTRAINT auth_user_username_key UNIQUE (username);


--
-- Name: django_admin_log django_admin_log_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.django_admin_log
    ADD CONSTRAINT django_admin_log_pkey PRIMARY KEY (id);


--
-- Name: django_content_type django_content_type_app_label_model_76bd3d3b_uniq; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.django_content_type
    ADD CONSTRAINT django_content_type_app_label_model_76bd3d3b_uniq UNIQUE (app_label, model);


--
-- Name: django_content_type django_content_type_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.django_content_type
    ADD CONSTRAINT django_content_type_pkey PRIMARY KEY (id);


--
-- Name: django_migrations django_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.django_migrations
    ADD CONSTRAINT django_migrations_pkey PRIMARY KEY (id);


--
-- Name: django_session django_session_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.django_session
    ADD CONSTRAINT django_session_pkey PRIMARY KEY (session_key);


--
-- Name: maps_file_file_map maps_file_file_map_file_id_map_id_ff59351d_uniq; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_file_file_map
    ADD CONSTRAINT maps_file_file_map_file_id_map_id_ff59351d_uniq UNIQUE (file_id, map_id);


--
-- Name: maps_file_file_map maps_file_file_map_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_file_file_map
    ADD CONSTRAINT maps_file_file_map_pkey PRIMARY KEY (id);


--
-- Name: maps_file_file_reference maps_file_file_reference_file_id_reference_id_b9cece58_uniq; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_file_file_reference
    ADD CONSTRAINT maps_file_file_reference_file_id_reference_id_b9cece58_uniq UNIQUE (file_id, reference_id);


--
-- Name: maps_file_file_reference maps_file_file_reference_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_file_file_reference
    ADD CONSTRAINT maps_file_file_reference_pkey PRIMARY KEY (id);


--
-- Name: maps_file_file_type maps_file_file_type_file_id_type_id_efbea730_uniq; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_file_file_type
    ADD CONSTRAINT maps_file_file_type_file_id_type_id_efbea730_uniq UNIQUE (file_id, type_id);


--
-- Name: maps_file_file_type maps_file_file_type_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_file_file_type
    ADD CONSTRAINT maps_file_file_type_pkey PRIMARY KEY (id);


--
-- Name: maps_file maps_file_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_file
    ADD CONSTRAINT maps_file_pkey PRIMARY KEY (id);


--
-- Name: maps_institute_institute_type maps_institute_institute_institute_id_type_id_4ff99b12_uniq; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_institute_institute_type
    ADD CONSTRAINT maps_institute_institute_institute_id_type_id_4ff99b12_uniq UNIQUE (institute_id, type_id);


--
-- Name: maps_institute_institute_type maps_institute_institute_type_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_institute_institute_type
    ADD CONSTRAINT maps_institute_institute_type_pkey PRIMARY KEY (id);


--
-- Name: maps_institute maps_institute_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_institute
    ADD CONSTRAINT maps_institute_pkey PRIMARY KEY (id);


--
-- Name: maps_map_map_file maps_map_map_file_map_id_file_id_0c980a11_uniq; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_file
    ADD CONSTRAINT maps_map_map_file_map_id_file_id_0c980a11_uniq UNIQUE (map_id, file_id);


--
-- Name: maps_map_map_file maps_map_map_file_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_file
    ADD CONSTRAINT maps_map_map_file_pkey PRIMARY KEY (id);


--
-- Name: maps_map_map_institute maps_map_map_institute_map_id_institute_id_8569aa5c_uniq; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_institute
    ADD CONSTRAINT maps_map_map_institute_map_id_institute_id_8569aa5c_uniq UNIQUE (map_id, institute_id);


--
-- Name: maps_map_map_institute maps_map_map_institute_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_institute
    ADD CONSTRAINT maps_map_map_institute_pkey PRIMARY KEY (id);


--
-- Name: maps_map_map_persons maps_map_map_persons_map_id_person_id_86915b7f_uniq; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_persons
    ADD CONSTRAINT maps_map_map_persons_map_id_person_id_86915b7f_uniq UNIQUE (map_id, person_id);


--
-- Name: maps_map_map_persons maps_map_map_persons_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_persons
    ADD CONSTRAINT maps_map_map_persons_pkey PRIMARY KEY (id);


--
-- Name: maps_map_map_places maps_map_map_places_map_id_place_id_55c2923d_uniq; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_places
    ADD CONSTRAINT maps_map_map_places_map_id_place_id_55c2923d_uniq UNIQUE (map_id, place_id);


--
-- Name: maps_map_map_places maps_map_map_places_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_places
    ADD CONSTRAINT maps_map_map_places_pkey PRIMARY KEY (id);


--
-- Name: maps_map_map_references maps_map_map_references_map_id_reference_id_6d416742_uniq; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_references
    ADD CONSTRAINT maps_map_map_references_map_id_reference_id_6d416742_uniq UNIQUE (map_id, reference_id);


--
-- Name: maps_map_map_references maps_map_map_references_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_references
    ADD CONSTRAINT maps_map_map_references_pkey PRIMARY KEY (id);


--
-- Name: maps_map_map_scan maps_map_map_scan_map_id_scan_id_f6124912_uniq; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_scan
    ADD CONSTRAINT maps_map_map_scan_map_id_scan_id_f6124912_uniq UNIQUE (map_id, scan_id);


--
-- Name: maps_map_map_scan maps_map_map_scan_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_scan
    ADD CONSTRAINT maps_map_map_scan_pkey PRIMARY KEY (id);


--
-- Name: maps_map_map_type maps_map_map_type_map_id_type_id_7bfe0076_uniq; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_type
    ADD CONSTRAINT maps_map_map_type_map_id_type_id_7bfe0076_uniq UNIQUE (map_id, type_id);


--
-- Name: maps_map_map_type maps_map_map_type_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_type
    ADD CONSTRAINT maps_map_map_type_pkey PRIMARY KEY (id);


--
-- Name: maps_map maps_map_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map
    ADD CONSTRAINT maps_map_pkey PRIMARY KEY (id);


--
-- Name: maps_person_person_institutes maps_person_person_insti_person_id_institute_id_dcf6c4ed_uniq; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_person_person_institutes
    ADD CONSTRAINT maps_person_person_insti_person_id_institute_id_dcf6c4ed_uniq UNIQUE (person_id, institute_id);


--
-- Name: maps_person_person_institutes maps_person_person_institutes_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_person_person_institutes
    ADD CONSTRAINT maps_person_person_institutes_pkey PRIMARY KEY (id);


--
-- Name: maps_person_person_type maps_person_person_type_person_id_type_id_e4987fe7_uniq; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_person_person_type
    ADD CONSTRAINT maps_person_person_type_person_id_type_id_e4987fe7_uniq UNIQUE (person_id, type_id);


--
-- Name: maps_person_person_type maps_person_person_type_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_person_person_type
    ADD CONSTRAINT maps_person_person_type_pkey PRIMARY KEY (id);


--
-- Name: maps_person maps_person_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_person
    ADD CONSTRAINT maps_person_pkey PRIMARY KEY (id);


--
-- Name: maps_place maps_place_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_place
    ADD CONSTRAINT maps_place_pkey PRIMARY KEY (id);


--
-- Name: maps_place_place_type maps_place_place_type_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_place_place_type
    ADD CONSTRAINT maps_place_place_type_pkey PRIMARY KEY (id);


--
-- Name: maps_place_place_type maps_place_place_type_place_id_type_id_279cfb12_uniq; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_place_place_type
    ADD CONSTRAINT maps_place_place_type_place_id_type_id_279cfb12_uniq UNIQUE (place_id, type_id);


--
-- Name: maps_reference maps_reference_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_reference
    ADD CONSTRAINT maps_reference_pkey PRIMARY KEY (id);


--
-- Name: maps_reference_reference_type maps_reference_reference_reference_id_type_id_be0389aa_uniq; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_reference_reference_type
    ADD CONSTRAINT maps_reference_reference_reference_id_type_id_be0389aa_uniq UNIQUE (reference_id, type_id);


--
-- Name: maps_reference_reference_type maps_reference_reference_type_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_reference_reference_type
    ADD CONSTRAINT maps_reference_reference_type_pkey PRIMARY KEY (id);


--
-- Name: maps_scan maps_scan_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_scan
    ADD CONSTRAINT maps_scan_pkey PRIMARY KEY (id);


--
-- Name: maps_scan_scan_map maps_scan_scan_map_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_scan_scan_map
    ADD CONSTRAINT maps_scan_scan_map_pkey PRIMARY KEY (id);


--
-- Name: maps_scan_scan_map maps_scan_scan_map_scan_id_map_id_97630f8f_uniq; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_scan_scan_map
    ADD CONSTRAINT maps_scan_scan_map_scan_id_map_id_97630f8f_uniq UNIQUE (scan_id, map_id);


--
-- Name: maps_scan_scan_person maps_scan_scan_person_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_scan_scan_person
    ADD CONSTRAINT maps_scan_scan_person_pkey PRIMARY KEY (id);


--
-- Name: maps_scan_scan_person maps_scan_scan_person_scan_id_person_id_7dd06cf1_uniq; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_scan_scan_person
    ADD CONSTRAINT maps_scan_scan_person_scan_id_person_id_7dd06cf1_uniq UNIQUE (scan_id, person_id);


--
-- Name: maps_scan_scan_reference maps_scan_scan_reference_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_scan_scan_reference
    ADD CONSTRAINT maps_scan_scan_reference_pkey PRIMARY KEY (id);


--
-- Name: maps_scan_scan_reference maps_scan_scan_reference_scan_id_reference_id_a6e37230_uniq; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_scan_scan_reference
    ADD CONSTRAINT maps_scan_scan_reference_scan_id_reference_id_a6e37230_uniq UNIQUE (scan_id, reference_id);


--
-- Name: maps_scan_scan_type maps_scan_scan_type_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_scan_scan_type
    ADD CONSTRAINT maps_scan_scan_type_pkey PRIMARY KEY (id);


--
-- Name: maps_scan_scan_type maps_scan_scan_type_scan_id_type_id_f92f6b7e_uniq; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_scan_scan_type
    ADD CONSTRAINT maps_scan_scan_type_scan_id_type_id_f92f6b7e_uniq UNIQUE (scan_id, type_id);


--
-- Name: maps_type maps_type_pkey; Type: CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_type
    ADD CONSTRAINT maps_type_pkey PRIMARY KEY (id);


--
-- Name: auth_group_name_a6ea08ec_like; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX auth_group_name_a6ea08ec_like ON public.auth_group USING btree (name varchar_pattern_ops);


--
-- Name: auth_group_permissions_group_id_b120cbf9; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX auth_group_permissions_group_id_b120cbf9 ON public.auth_group_permissions USING btree (group_id);


--
-- Name: auth_group_permissions_permission_id_84c5c92e; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX auth_group_permissions_permission_id_84c5c92e ON public.auth_group_permissions USING btree (permission_id);


--
-- Name: auth_permission_content_type_id_2f476e4b; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX auth_permission_content_type_id_2f476e4b ON public.auth_permission USING btree (content_type_id);


--
-- Name: auth_user_groups_group_id_97559544; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX auth_user_groups_group_id_97559544 ON public.auth_user_groups USING btree (group_id);


--
-- Name: auth_user_groups_user_id_6a12ed8b; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX auth_user_groups_user_id_6a12ed8b ON public.auth_user_groups USING btree (user_id);


--
-- Name: auth_user_user_permissions_permission_id_1fbb5f2c; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX auth_user_user_permissions_permission_id_1fbb5f2c ON public.auth_user_user_permissions USING btree (permission_id);


--
-- Name: auth_user_user_permissions_user_id_a95ead1b; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX auth_user_user_permissions_user_id_a95ead1b ON public.auth_user_user_permissions USING btree (user_id);


--
-- Name: auth_user_username_6821ab7c_like; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX auth_user_username_6821ab7c_like ON public.auth_user USING btree (username varchar_pattern_ops);


--
-- Name: django_admin_log_content_type_id_c4bce8eb; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX django_admin_log_content_type_id_c4bce8eb ON public.django_admin_log USING btree (content_type_id);


--
-- Name: django_admin_log_user_id_c564eba6; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX django_admin_log_user_id_c564eba6 ON public.django_admin_log USING btree (user_id);


--
-- Name: django_session_expire_date_a5c62663; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX django_session_expire_date_a5c62663 ON public.django_session USING btree (expire_date);


--
-- Name: django_session_session_key_c0390e0f_like; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX django_session_session_key_c0390e0f_like ON public.django_session USING btree (session_key varchar_pattern_ops);


--
-- Name: maps_file_file_map_file_id_c307ffeb; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_file_file_map_file_id_c307ffeb ON public.maps_file_file_map USING btree (file_id);


--
-- Name: maps_file_file_map_map_id_9e0bdd7c; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_file_file_map_map_id_9e0bdd7c ON public.maps_file_file_map USING btree (map_id);


--
-- Name: maps_file_file_reference_file_id_fda1266a; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_file_file_reference_file_id_fda1266a ON public.maps_file_file_reference USING btree (file_id);


--
-- Name: maps_file_file_reference_reference_id_d0f31d94; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_file_file_reference_reference_id_d0f31d94 ON public.maps_file_file_reference USING btree (reference_id);


--
-- Name: maps_file_file_type_file_id_bc62ba18; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_file_file_type_file_id_bc62ba18 ON public.maps_file_file_type USING btree (file_id);


--
-- Name: maps_file_file_type_type_id_deb4d1f7; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_file_file_type_type_id_deb4d1f7 ON public.maps_file_file_type USING btree (type_id);


--
-- Name: maps_institute_institute_location_id_6a11dc54; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_institute_institute_location_id_6a11dc54 ON public.maps_institute USING btree (institute_location_id);


--
-- Name: maps_institute_institute_type_institute_id_278e76cc; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_institute_institute_type_institute_id_278e76cc ON public.maps_institute_institute_type USING btree (institute_id);


--
-- Name: maps_institute_institute_type_type_id_4764f400; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_institute_institute_type_type_id_4764f400 ON public.maps_institute_institute_type USING btree (type_id);


--
-- Name: maps_map_map_base_id_d4c8d198; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_map_map_base_id_d4c8d198 ON public.maps_map USING btree (map_base_id);


--
-- Name: maps_map_map_copy_id_d8a9b7a1; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_map_map_copy_id_d8a9b7a1 ON public.maps_map USING btree (map_copy_id);


--
-- Name: maps_map_map_file_file_id_8ba3db90; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_map_map_file_file_id_8ba3db90 ON public.maps_map_map_file USING btree (file_id);


--
-- Name: maps_map_map_file_map_id_9e4e4fb7; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_map_map_file_map_id_9e4e4fb7 ON public.maps_map_map_file USING btree (map_id);


--
-- Name: maps_map_map_institute_institute_id_22dabb5a; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_map_map_institute_institute_id_22dabb5a ON public.maps_map_map_institute USING btree (institute_id);


--
-- Name: maps_map_map_institute_map_id_6256af8a; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_map_map_institute_map_id_6256af8a ON public.maps_map_map_institute USING btree (map_id);


--
-- Name: maps_map_map_issued_id_0895c253; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_map_map_issued_id_0895c253 ON public.maps_map USING btree (map_issued_id);


--
-- Name: maps_map_map_location_id_2b1e0353; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_map_map_location_id_2b1e0353 ON public.maps_map USING btree (map_location_id);


--
-- Name: maps_map_map_persons_map_id_aa413b5f; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_map_map_persons_map_id_aa413b5f ON public.maps_map_map_persons USING btree (map_id);


--
-- Name: maps_map_map_persons_person_id_dae77c35; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_map_map_persons_person_id_dae77c35 ON public.maps_map_map_persons USING btree (person_id);


--
-- Name: maps_map_map_places_map_id_cdf091f2; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_map_map_places_map_id_cdf091f2 ON public.maps_map_map_places USING btree (map_id);


--
-- Name: maps_map_map_places_place_id_1a799e4a; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_map_map_places_place_id_1a799e4a ON public.maps_map_map_places USING btree (place_id);


--
-- Name: maps_map_map_references_map_id_6d8dfd3f; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_map_map_references_map_id_6d8dfd3f ON public.maps_map_map_references USING btree (map_id);


--
-- Name: maps_map_map_references_reference_id_459a89ca; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_map_map_references_reference_id_459a89ca ON public.maps_map_map_references USING btree (reference_id);


--
-- Name: maps_map_map_scan_map_id_8d0022f4; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_map_map_scan_map_id_8d0022f4 ON public.maps_map_map_scan USING btree (map_id);


--
-- Name: maps_map_map_scan_scan_id_465e3c0c; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_map_map_scan_scan_id_465e3c0c ON public.maps_map_map_scan USING btree (scan_id);


--
-- Name: maps_map_map_type_map_id_a296045b; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_map_map_type_map_id_a296045b ON public.maps_map_map_type USING btree (map_id);


--
-- Name: maps_map_map_type_type_id_c24ef6de; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_map_map_type_type_id_c24ef6de ON public.maps_map_map_type USING btree (type_id);


--
-- Name: maps_person_person_institutes_institute_id_3123fbb4; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_person_person_institutes_institute_id_3123fbb4 ON public.maps_person_person_institutes USING btree (institute_id);


--
-- Name: maps_person_person_institutes_person_id_02ba207a; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_person_person_institutes_person_id_02ba207a ON public.maps_person_person_institutes USING btree (person_id);


--
-- Name: maps_person_person_location_id_e23c9ecc; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_person_person_location_id_e23c9ecc ON public.maps_person USING btree (person_location_id);


--
-- Name: maps_person_person_type_person_id_94b985a4; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_person_person_type_person_id_94b985a4 ON public.maps_person_person_type USING btree (person_id);


--
-- Name: maps_person_person_type_type_id_138219a0; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_person_person_type_type_id_138219a0 ON public.maps_person_person_type USING btree (type_id);


--
-- Name: maps_place_place_type_place_id_21fde972; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_place_place_type_place_id_21fde972 ON public.maps_place_place_type USING btree (place_id);


--
-- Name: maps_place_place_type_type_id_fbbfec63; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_place_place_type_type_id_fbbfec63 ON public.maps_place_place_type USING btree (type_id);


--
-- Name: maps_reference_reference_type_reference_id_38cd6479; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_reference_reference_type_reference_id_38cd6479 ON public.maps_reference_reference_type USING btree (reference_id);


--
-- Name: maps_reference_reference_type_type_id_7e338932; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_reference_reference_type_type_id_7e338932 ON public.maps_reference_reference_type USING btree (type_id);


--
-- Name: maps_reference_super_id_09e3bb42; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_reference_super_id_09e3bb42 ON public.maps_reference USING btree (super_id);


--
-- Name: maps_scan_scan_map_map_id_9e720248; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_scan_scan_map_map_id_9e720248 ON public.maps_scan_scan_map USING btree (map_id);


--
-- Name: maps_scan_scan_map_scan_id_21a19138; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_scan_scan_map_scan_id_21a19138 ON public.maps_scan_scan_map USING btree (scan_id);


--
-- Name: maps_scan_scan_person_person_id_f99c3461; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_scan_scan_person_person_id_f99c3461 ON public.maps_scan_scan_person USING btree (person_id);


--
-- Name: maps_scan_scan_person_scan_id_88d9cce9; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_scan_scan_person_scan_id_88d9cce9 ON public.maps_scan_scan_person USING btree (scan_id);


--
-- Name: maps_scan_scan_reference_reference_id_efaf24e5; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_scan_scan_reference_reference_id_efaf24e5 ON public.maps_scan_scan_reference USING btree (reference_id);


--
-- Name: maps_scan_scan_reference_scan_id_c86b5a3e; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_scan_scan_reference_scan_id_c86b5a3e ON public.maps_scan_scan_reference USING btree (scan_id);


--
-- Name: maps_scan_scan_type_scan_id_2d3729f3; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_scan_scan_type_scan_id_2d3729f3 ON public.maps_scan_scan_type USING btree (scan_id);


--
-- Name: maps_scan_scan_type_type_id_fc19d491; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_scan_scan_type_type_id_fc19d491 ON public.maps_scan_scan_type USING btree (type_id);


--
-- Name: maps_type_level_994128a4; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_type_level_994128a4 ON public.maps_type USING btree (level);


--
-- Name: maps_type_lft_f368a00c; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_type_lft_f368a00c ON public.maps_type USING btree (lft);


--
-- Name: maps_type_parent_id_b8277754; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_type_parent_id_b8277754 ON public.maps_type USING btree (parent_id);


--
-- Name: maps_type_rght_04c51423; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_type_rght_04c51423 ON public.maps_type USING btree (rght);


--
-- Name: maps_type_tree_id_9ddf6cd6; Type: INDEX; Schema: public; Owner: diauma
--

CREATE INDEX maps_type_tree_id_9ddf6cd6 ON public.maps_type USING btree (tree_id);


--
-- Name: auth_group_permissions auth_group_permissio_permission_id_84c5c92e_fk_auth_perm; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.auth_group_permissions
    ADD CONSTRAINT auth_group_permissio_permission_id_84c5c92e_fk_auth_perm FOREIGN KEY (permission_id) REFERENCES public.auth_permission(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: auth_group_permissions auth_group_permissions_group_id_b120cbf9_fk_auth_group_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.auth_group_permissions
    ADD CONSTRAINT auth_group_permissions_group_id_b120cbf9_fk_auth_group_id FOREIGN KEY (group_id) REFERENCES public.auth_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: auth_permission auth_permission_content_type_id_2f476e4b_fk_django_co; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.auth_permission
    ADD CONSTRAINT auth_permission_content_type_id_2f476e4b_fk_django_co FOREIGN KEY (content_type_id) REFERENCES public.django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: auth_user_groups auth_user_groups_group_id_97559544_fk_auth_group_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.auth_user_groups
    ADD CONSTRAINT auth_user_groups_group_id_97559544_fk_auth_group_id FOREIGN KEY (group_id) REFERENCES public.auth_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: auth_user_groups auth_user_groups_user_id_6a12ed8b_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.auth_user_groups
    ADD CONSTRAINT auth_user_groups_user_id_6a12ed8b_fk_auth_user_id FOREIGN KEY (user_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: auth_user_user_permissions auth_user_user_permi_permission_id_1fbb5f2c_fk_auth_perm; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.auth_user_user_permissions
    ADD CONSTRAINT auth_user_user_permi_permission_id_1fbb5f2c_fk_auth_perm FOREIGN KEY (permission_id) REFERENCES public.auth_permission(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: auth_user_user_permissions auth_user_user_permissions_user_id_a95ead1b_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.auth_user_user_permissions
    ADD CONSTRAINT auth_user_user_permissions_user_id_a95ead1b_fk_auth_user_id FOREIGN KEY (user_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: django_admin_log django_admin_log_content_type_id_c4bce8eb_fk_django_co; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.django_admin_log
    ADD CONSTRAINT django_admin_log_content_type_id_c4bce8eb_fk_django_co FOREIGN KEY (content_type_id) REFERENCES public.django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: django_admin_log django_admin_log_user_id_c564eba6_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.django_admin_log
    ADD CONSTRAINT django_admin_log_user_id_c564eba6_fk_auth_user_id FOREIGN KEY (user_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_file_file_map maps_file_file_map_file_id_c307ffeb_fk_maps_file_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_file_file_map
    ADD CONSTRAINT maps_file_file_map_file_id_c307ffeb_fk_maps_file_id FOREIGN KEY (file_id) REFERENCES public.maps_file(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_file_file_map maps_file_file_map_map_id_9e0bdd7c_fk_maps_map_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_file_file_map
    ADD CONSTRAINT maps_file_file_map_map_id_9e0bdd7c_fk_maps_map_id FOREIGN KEY (map_id) REFERENCES public.maps_map(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_file_file_reference maps_file_file_refer_reference_id_d0f31d94_fk_maps_refe; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_file_file_reference
    ADD CONSTRAINT maps_file_file_refer_reference_id_d0f31d94_fk_maps_refe FOREIGN KEY (reference_id) REFERENCES public.maps_reference(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_file_file_reference maps_file_file_reference_file_id_fda1266a_fk_maps_file_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_file_file_reference
    ADD CONSTRAINT maps_file_file_reference_file_id_fda1266a_fk_maps_file_id FOREIGN KEY (file_id) REFERENCES public.maps_file(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_file_file_type maps_file_file_type_file_id_bc62ba18_fk_maps_file_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_file_file_type
    ADD CONSTRAINT maps_file_file_type_file_id_bc62ba18_fk_maps_file_id FOREIGN KEY (file_id) REFERENCES public.maps_file(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_file_file_type maps_file_file_type_type_id_deb4d1f7_fk_maps_type_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_file_file_type
    ADD CONSTRAINT maps_file_file_type_type_id_deb4d1f7_fk_maps_type_id FOREIGN KEY (type_id) REFERENCES public.maps_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_institute_institute_type maps_institute_insti_institute_id_278e76cc_fk_maps_inst; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_institute_institute_type
    ADD CONSTRAINT maps_institute_insti_institute_id_278e76cc_fk_maps_inst FOREIGN KEY (institute_id) REFERENCES public.maps_institute(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_institute maps_institute_institute_location_id_6a11dc54_fk_maps_place_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_institute
    ADD CONSTRAINT maps_institute_institute_location_id_6a11dc54_fk_maps_place_id FOREIGN KEY (institute_location_id) REFERENCES public.maps_place(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_institute_institute_type maps_institute_institute_type_type_id_4764f400_fk_maps_type_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_institute_institute_type
    ADD CONSTRAINT maps_institute_institute_type_type_id_4764f400_fk_maps_type_id FOREIGN KEY (type_id) REFERENCES public.maps_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_map maps_map_map_base_id_d4c8d198_fk_maps_map_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map
    ADD CONSTRAINT maps_map_map_base_id_d4c8d198_fk_maps_map_id FOREIGN KEY (map_base_id) REFERENCES public.maps_map(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_map maps_map_map_copy_id_d8a9b7a1_fk_maps_map_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map
    ADD CONSTRAINT maps_map_map_copy_id_d8a9b7a1_fk_maps_map_id FOREIGN KEY (map_copy_id) REFERENCES public.maps_map(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_map_map_file maps_map_map_file_map_id_9e4e4fb7_fk_maps_map_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_file
    ADD CONSTRAINT maps_map_map_file_map_id_9e4e4fb7_fk_maps_map_id FOREIGN KEY (map_id) REFERENCES public.maps_map(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_map_map_institute maps_map_map_institu_institute_id_22dabb5a_fk_maps_inst; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_institute
    ADD CONSTRAINT maps_map_map_institu_institute_id_22dabb5a_fk_maps_inst FOREIGN KEY (institute_id) REFERENCES public.maps_institute(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_map_map_institute maps_map_map_institute_map_id_6256af8a_fk_maps_map_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_institute
    ADD CONSTRAINT maps_map_map_institute_map_id_6256af8a_fk_maps_map_id FOREIGN KEY (map_id) REFERENCES public.maps_map(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_map maps_map_map_issued_id_0895c253_fk_maps_place_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map
    ADD CONSTRAINT maps_map_map_issued_id_0895c253_fk_maps_place_id FOREIGN KEY (map_issued_id) REFERENCES public.maps_place(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_map maps_map_map_location_id_2b1e0353_fk_maps_place_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map
    ADD CONSTRAINT maps_map_map_location_id_2b1e0353_fk_maps_place_id FOREIGN KEY (map_location_id) REFERENCES public.maps_place(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_map_map_persons maps_map_map_persons_map_id_aa413b5f_fk_maps_map_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_persons
    ADD CONSTRAINT maps_map_map_persons_map_id_aa413b5f_fk_maps_map_id FOREIGN KEY (map_id) REFERENCES public.maps_map(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_map_map_persons maps_map_map_persons_person_id_dae77c35_fk_maps_person_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_persons
    ADD CONSTRAINT maps_map_map_persons_person_id_dae77c35_fk_maps_person_id FOREIGN KEY (person_id) REFERENCES public.maps_person(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_map_map_places maps_map_map_places_map_id_cdf091f2_fk_maps_map_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_places
    ADD CONSTRAINT maps_map_map_places_map_id_cdf091f2_fk_maps_map_id FOREIGN KEY (map_id) REFERENCES public.maps_map(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_map_map_places maps_map_map_places_place_id_1a799e4a_fk_maps_place_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_places
    ADD CONSTRAINT maps_map_map_places_place_id_1a799e4a_fk_maps_place_id FOREIGN KEY (place_id) REFERENCES public.maps_place(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_map_map_references maps_map_map_referen_reference_id_459a89ca_fk_maps_refe; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_references
    ADD CONSTRAINT maps_map_map_referen_reference_id_459a89ca_fk_maps_refe FOREIGN KEY (reference_id) REFERENCES public.maps_reference(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_map_map_references maps_map_map_references_map_id_6d8dfd3f_fk_maps_map_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_references
    ADD CONSTRAINT maps_map_map_references_map_id_6d8dfd3f_fk_maps_map_id FOREIGN KEY (map_id) REFERENCES public.maps_map(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_map_map_scan maps_map_map_scan_map_id_8d0022f4_fk_maps_map_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_scan
    ADD CONSTRAINT maps_map_map_scan_map_id_8d0022f4_fk_maps_map_id FOREIGN KEY (map_id) REFERENCES public.maps_map(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_map_map_type maps_map_map_type_map_id_a296045b_fk_maps_map_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_type
    ADD CONSTRAINT maps_map_map_type_map_id_a296045b_fk_maps_map_id FOREIGN KEY (map_id) REFERENCES public.maps_map(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_map_map_type maps_map_map_type_type_id_c24ef6de_fk_maps_type_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_map_map_type
    ADD CONSTRAINT maps_map_map_type_type_id_c24ef6de_fk_maps_type_id FOREIGN KEY (type_id) REFERENCES public.maps_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_person_person_institutes maps_person_person_i_institute_id_3123fbb4_fk_maps_inst; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_person_person_institutes
    ADD CONSTRAINT maps_person_person_i_institute_id_3123fbb4_fk_maps_inst FOREIGN KEY (institute_id) REFERENCES public.maps_institute(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_person_person_institutes maps_person_person_i_person_id_02ba207a_fk_maps_pers; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_person_person_institutes
    ADD CONSTRAINT maps_person_person_i_person_id_02ba207a_fk_maps_pers FOREIGN KEY (person_id) REFERENCES public.maps_person(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_person maps_person_person_location_id_e23c9ecc_fk_maps_place_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_person
    ADD CONSTRAINT maps_person_person_location_id_e23c9ecc_fk_maps_place_id FOREIGN KEY (person_location_id) REFERENCES public.maps_place(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_person_person_type maps_person_person_type_person_id_94b985a4_fk_maps_person_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_person_person_type
    ADD CONSTRAINT maps_person_person_type_person_id_94b985a4_fk_maps_person_id FOREIGN KEY (person_id) REFERENCES public.maps_person(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_person_person_type maps_person_person_type_type_id_138219a0_fk_maps_type_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_person_person_type
    ADD CONSTRAINT maps_person_person_type_type_id_138219a0_fk_maps_type_id FOREIGN KEY (type_id) REFERENCES public.maps_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_place_place_type maps_place_place_type_place_id_21fde972_fk_maps_place_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_place_place_type
    ADD CONSTRAINT maps_place_place_type_place_id_21fde972_fk_maps_place_id FOREIGN KEY (place_id) REFERENCES public.maps_place(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_place_place_type maps_place_place_type_type_id_fbbfec63_fk_maps_type_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_place_place_type
    ADD CONSTRAINT maps_place_place_type_type_id_fbbfec63_fk_maps_type_id FOREIGN KEY (type_id) REFERENCES public.maps_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_reference_reference_type maps_reference_refer_reference_id_38cd6479_fk_maps_refe; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_reference_reference_type
    ADD CONSTRAINT maps_reference_refer_reference_id_38cd6479_fk_maps_refe FOREIGN KEY (reference_id) REFERENCES public.maps_reference(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_reference_reference_type maps_reference_reference_type_type_id_7e338932_fk_maps_type_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_reference_reference_type
    ADD CONSTRAINT maps_reference_reference_type_type_id_7e338932_fk_maps_type_id FOREIGN KEY (type_id) REFERENCES public.maps_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_reference maps_reference_super_id_09e3bb42_fk_maps_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_reference
    ADD CONSTRAINT maps_reference_super_id_09e3bb42_fk_maps_reference_id FOREIGN KEY (super_id) REFERENCES public.maps_reference(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_scan_scan_map maps_scan_scan_map_map_id_9e720248_fk_maps_map_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_scan_scan_map
    ADD CONSTRAINT maps_scan_scan_map_map_id_9e720248_fk_maps_map_id FOREIGN KEY (map_id) REFERENCES public.maps_map(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_scan_scan_map maps_scan_scan_map_scan_id_21a19138_fk_maps_scan_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_scan_scan_map
    ADD CONSTRAINT maps_scan_scan_map_scan_id_21a19138_fk_maps_scan_id FOREIGN KEY (scan_id) REFERENCES public.maps_scan(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_scan_scan_person maps_scan_scan_person_person_id_f99c3461_fk_maps_person_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_scan_scan_person
    ADD CONSTRAINT maps_scan_scan_person_person_id_f99c3461_fk_maps_person_id FOREIGN KEY (person_id) REFERENCES public.maps_person(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_scan_scan_person maps_scan_scan_person_scan_id_88d9cce9_fk_maps_scan_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_scan_scan_person
    ADD CONSTRAINT maps_scan_scan_person_scan_id_88d9cce9_fk_maps_scan_id FOREIGN KEY (scan_id) REFERENCES public.maps_scan(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_scan_scan_reference maps_scan_scan_refer_reference_id_efaf24e5_fk_maps_refe; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_scan_scan_reference
    ADD CONSTRAINT maps_scan_scan_refer_reference_id_efaf24e5_fk_maps_refe FOREIGN KEY (reference_id) REFERENCES public.maps_reference(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_scan_scan_reference maps_scan_scan_reference_scan_id_c86b5a3e_fk_maps_scan_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_scan_scan_reference
    ADD CONSTRAINT maps_scan_scan_reference_scan_id_c86b5a3e_fk_maps_scan_id FOREIGN KEY (scan_id) REFERENCES public.maps_scan(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_scan_scan_type maps_scan_scan_type_scan_id_2d3729f3_fk_maps_scan_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_scan_scan_type
    ADD CONSTRAINT maps_scan_scan_type_scan_id_2d3729f3_fk_maps_scan_id FOREIGN KEY (scan_id) REFERENCES public.maps_scan(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_scan_scan_type maps_scan_scan_type_type_id_fc19d491_fk_maps_type_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_scan_scan_type
    ADD CONSTRAINT maps_scan_scan_type_type_id_fc19d491_fk_maps_type_id FOREIGN KEY (type_id) REFERENCES public.maps_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: maps_type maps_type_parent_id_b8277754_fk_maps_type_id; Type: FK CONSTRAINT; Schema: public; Owner: diauma
--

ALTER TABLE ONLY public.maps_type
    ADD CONSTRAINT maps_type_parent_id_b8277754_fk_maps_type_id FOREIGN KEY (parent_id) REFERENCES public.maps_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- PostgreSQL database dump complete
--

