Skip to content
Snippets Groups Projects
toardb_dump.sql 55.7 KiB
Newer Older
--
-- PostgreSQL database dump
--

-- Dumped from database version 10.3 (Ubuntu 10.3-1)
-- Dumped by pg_dump version 10.3 (Ubuntu 10.3-1)

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 client_min_messages = warning;
SET row_security = off;

--
-- Name: postgis; Type: SCHEMA; Schema: -; Owner: toaradmin
--

CREATE SCHEMA postgis;


ALTER SCHEMA postgis OWNER TO toaradmin;

--
-- Name: tiger; Type: SCHEMA; Schema: -; Owner: toaradmin
--

CREATE SCHEMA tiger;


ALTER SCHEMA tiger OWNER TO toaradmin;

--
-- Name: tiger_data; Type: SCHEMA; Schema: -; Owner: toaradmin
--

CREATE SCHEMA tiger_data;


ALTER SCHEMA tiger_data OWNER TO toaradmin;

--
-- Name: topology; Type: SCHEMA; Schema: -; Owner: toaradmin
--

CREATE SCHEMA topology;


ALTER SCHEMA topology OWNER TO toaradmin;

--
-- Name: SCHEMA topology; Type: COMMENT; Schema: -; Owner: toaradmin
--

COMMENT ON SCHEMA topology IS 'PostGIS Topology schema';


--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: 
--

CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;


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

COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';


--
-- Name: address_standardizer; Type: EXTENSION; Schema: -; Owner: 
--

CREATE EXTENSION IF NOT EXISTS address_standardizer WITH SCHEMA public;


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

COMMENT ON EXTENSION address_standardizer IS 'Used to parse an address into constituent elements. Generally used to support geocoding address normalization step.';


--
-- Name: address_standardizer_data_us; Type: EXTENSION; Schema: -; Owner: 
--

CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us WITH SCHEMA public;


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

COMMENT ON EXTENSION address_standardizer_data_us IS 'Address Standardizer US dataset example';


--
-- Name: fuzzystrmatch; Type: EXTENSION; Schema: -; Owner: 
--

CREATE EXTENSION IF NOT EXISTS fuzzystrmatch WITH SCHEMA public;


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

COMMENT ON EXTENSION fuzzystrmatch IS 'determine similarities and distance between strings';


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

CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA postgis;


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

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


--
-- Name: postgis_tiger_geocoder; Type: EXTENSION; Schema: -; Owner: 
--

CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder WITH SCHEMA tiger;


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

COMMENT ON EXTENSION postgis_tiger_geocoder IS 'PostGIS tiger geocoder and reverse geocoder';


--
-- Name: postgis_topology; Type: EXTENSION; Schema: -; Owner: 
--

CREATE EXTENSION IF NOT EXISTS postgis_topology WITH SCHEMA topology;


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

COMMENT ON EXTENSION postgis_topology IS 'PostGIS topology spatial types and functions';


SET default_tablespace = '';

SET default_with_oids = false;

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

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 toaradmin;

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

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


ALTER TABLE public.auth_user_id_seq OWNER TO toaradmin;

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

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

--
-- Name: data; Type: TABLE; Schema: public; Owner: toaradmin
--

CREATE TABLE public.data (
	    datetime timestamp with time zone NOT NULL,
	    value double precision NOT NULL,
	    flags integer NOT NULL,
	    timeseries_id integer NOT NULL,
	    CONSTRAINT data_flags_check CHECK ((flags >= 0))
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957
);

ALTER TABLE public.data OWNER TO toaradmin;

--
-- Name: organisations; Type: TABLE; Schema: public; Owner: toaradmin
--

CREATE TABLE public.organisations (
    id integer NOT NULL,
    name character varying(32) NOT NULL,
    longname character varying(128) NOT NULL,
    kind integer NOT NULL,
    city character varying(64) NOT NULL,
    postcode character varying(16) NOT NULL,
    street_address character varying(128) NOT NULL,
    country character varying(64) NOT NULL,
    homepage character varying(200) NOT NULL,
    CONSTRAINT organisations_kind_check CHECK ((kind >= 0))
);


ALTER TABLE public.organisations OWNER TO toaradmin;

--
-- Name: organisations_id_seq; Type: SEQUENCE; Schema: public; Owner: toaradmin
--

CREATE SEQUENCE public.organisations_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.organisations_id_seq OWNER TO toaradmin;

--
-- Name: organisations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: toaradmin
--

ALTER SEQUENCE public.organisations_id_seq OWNED BY public.organisations.id;


--
-- Name: persons; Type: TABLE; Schema: public; Owner: toaradmin
--

CREATE TABLE public.persons (
    id integer NOT NULL,
    name character varying(64) NOT NULL,
    email character varying(128) NOT NULL,
    phone character varying(32) NOT NULL,
    isprivate boolean NOT NULL
);


ALTER TABLE public.persons OWNER TO toaradmin;

--
-- Name: persons_id_seq; Type: SEQUENCE; Schema: public; Owner: toaradmin
--

CREATE SEQUENCE public.persons_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.persons_id_seq OWNER TO toaradmin;

--
-- Name: persons_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: toaradmin
--

ALTER SEQUENCE public.persons_id_seq OWNED BY public.persons.id;


--
-- Name: stationmeta_roles; Type: TABLE; Schema: public; Owner: toaradmin
--

CREATE TABLE public.stationmeta_roles (
    id integer NOT NULL,
    role integer NOT NULL,
    status integer NOT NULL,
    person_id integer NOT NULL,
    station_id integer NOT NULL,
    CONSTRAINT stationmeta_roles_role_check CHECK ((role >= 0)),
    CONSTRAINT stationmeta_roles_status_check CHECK ((status >= 0))
);


ALTER TABLE public.stationmeta_roles OWNER TO toaradmin;

--
-- Name: stationmeta_roles_id_seq; Type: SEQUENCE; Schema: public; Owner: toaradmin
--

CREATE SEQUENCE public.stationmeta_roles_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.stationmeta_roles_id_seq OWNER TO toaradmin;

--
-- Name: stationmeta_roles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: toaradmin
--

ALTER SEQUENCE public.stationmeta_roles_id_seq OWNED BY public.stationmeta_roles.id;


--
-- Name: stationmeta_annotations; Type: TABLE; Schema: public; Owner: toaradmin
--

CREATE TABLE public.stationmeta_annotations (
    id integer NOT NULL,
    kind integer NOT NULL,
    text text NOT NULL,
    date_added timestamp with time zone NOT NULL,
    approved boolean NOT NULL,
    contributor_id integer NOT NULL,
    station_id integer NOT NULL,
    CONSTRAINT stationmeta_annotations_kind_check CHECK ((kind >= 0))
);


ALTER TABLE public.stationmeta_annotations OWNER TO toaradmin;

--
-- Name: stationmeta_annotations_id_seq; Type: SEQUENCE; Schema: public; Owner: toaradmin
--

CREATE SEQUENCE public.stationmeta_annotations_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.stationmeta_annotations_id_seq OWNER TO toaradmin;

--
-- Name: stationmeta_annotations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: toaradmin
--

ALTER SEQUENCE public.stationmeta_annotations_id_seq OWNED BY public.stationmeta_annotations.id;


--
-- Name: stationmeta_aux_doc; Type: TABLE; Schema: public; Owner: toaradmin
--

CREATE TABLE public.stationmeta_aux_doc (
    id integer NOT NULL,
    resource_description text NOT NULL,
    date_added timestamp with time zone NOT NULL,
    resource character varying(100) NOT NULL,
    station_id integer
);


ALTER TABLE public.stationmeta_aux_doc OWNER TO toaradmin;

--
-- Name: stationmeta_aux_doc_id_seq; Type: SEQUENCE; Schema: public; Owner: toaradmin
--

CREATE SEQUENCE public.stationmeta_aux_doc_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.stationmeta_aux_doc_id_seq OWNER TO toaradmin;

--
-- Name: stationmeta_aux_doc_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: toaradmin
--

ALTER SEQUENCE public.stationmeta_aux_doc_id_seq OWNED BY public.stationmeta_aux_doc.id;


--
-- Name: stationmeta_aux_image; Type: TABLE; Schema: public; Owner: toaradmin
--

CREATE TABLE public.stationmeta_aux_image (
    id integer NOT NULL,
    resource_description text NOT NULL,
    date_added timestamp with time zone NOT NULL,
    resource character varying(100) NOT NULL,
    image_height integer NOT NULL,
    image_width integer NOT NULL,
    station_id integer,
    CONSTRAINT stationmeta_aux_image_image_height_check CHECK ((image_height >= 0)),
    CONSTRAINT stationmeta_aux_image_image_width_check CHECK ((image_width >= 0))
);


ALTER TABLE public.stationmeta_aux_image OWNER TO toaradmin;

--
-- Name: stationmeta_aux_image_id_seq; Type: SEQUENCE; Schema: public; Owner: toaradmin
--

CREATE SEQUENCE public.stationmeta_aux_image_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.stationmeta_aux_image_id_seq OWNER TO toaradmin;

--
-- Name: stationmeta_aux_image_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: toaradmin
--

ALTER SEQUENCE public.stationmeta_aux_image_id_seq OWNED BY public.stationmeta_aux_image.id;


--
-- Name: stationmeta_aux_url; Type: TABLE; Schema: public; Owner: toaradmin
--

CREATE TABLE public.stationmeta_aux_url (
    id integer NOT NULL,
    resource_description text NOT NULL,
    date_added timestamp with time zone NOT NULL,
    resource character varying(200) NOT NULL,
    station_id integer
);


ALTER TABLE public.stationmeta_aux_url OWNER TO toaradmin;

--
-- Name: stationmeta_aux_url_id_seq; Type: SEQUENCE; Schema: public; Owner: toaradmin
--

CREATE SEQUENCE public.stationmeta_aux_url_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.stationmeta_aux_url_id_seq OWNER TO toaradmin;

--
-- Name: stationmeta_aux_url_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: toaradmin
--

ALTER SEQUENCE public.stationmeta_aux_url_id_seq OWNED BY public.stationmeta_aux_url.id;


--
-- Name: stationmeta_core; Type: TABLE; Schema: public; Owner: toaradmin
--

CREATE TABLE public.stationmeta_core (
    id integer NOT NULL,
    codes character varying(16)[],
    name character varying(128) NOT NULL,
    coordinates postgis.geometry(PointZ,4326) NOT NULL,
    country character varying(128) NOT NULL,
    state character varying(128) NOT NULL,
    coordinate_validation_status integer NOT NULL,
    coordinate_validation_date timestamp with time zone NOT NULL,
    type_of_environment integer NOT NULL,
    type_of_area integer NOT NULL,
    category character varying(128) NOT NULL,
    timezone character varying(64) NOT NULL,
    additional_metadata jsonb NOT NULL,
    coordinate_validator_id integer NOT NULL,
    CONSTRAINT stationmeta_core_coordinate_validation_status_check CHECK ((coordinate_validation_status >= 0)),
    CONSTRAINT stationmeta_core_type_of_area_check CHECK ((type_of_area >= 0)),
    CONSTRAINT stationmeta_core_type_of_environment_check CHECK ((type_of_environment >= 0))
);


ALTER TABLE public.stationmeta_core OWNER TO toaradmin;

--
-- Name: stationmeta_core_id_seq; Type: SEQUENCE; Schema: public; Owner: toaradmin
--

CREATE SEQUENCE public.stationmeta_core_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.stationmeta_core_id_seq OWNER TO toaradmin;

--
-- Name: stationmeta_core_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: toaradmin
--

ALTER SEQUENCE public.stationmeta_core_id_seq OWNED BY public.stationmeta_core.id;


--
-- Name: stationmeta_global; Type: TABLE; Schema: public; Owner: toaradmin
--

CREATE TABLE public.stationmeta_global (
    id integer NOT NULL,
    population_density_year2010 double precision NOT NULL,
    max_population_density_25km_year2010 double precision NOT NULL,
    climatic_zone integer NOT NULL,
    nightlight_1km_year2013 double precision NOT NULL,
    nightlight_5km_year2013 double precision NOT NULL,
    max_nightlight_25km_year2013 double precision NOT NULL,
    wheat_production_year2000 double precision NOT NULL,
    rice_production_year2000 double precision NOT NULL,
    edgar_htap_v2_nox_emissions_year2010 double precision NOT NULL,
    omi_no2_column_years2011to2015 double precision NOT NULL,
    htap_region_tier1 integer NOT NULL,
    etopo_alt double precision NOT NULL,
    etopo_min_alt_5km double precision NOT NULL,
    etopo_relative_alt double precision NOT NULL,
    dominant_landcover_year2012 integer NOT NULL,
    toar1_category integer NOT NULL,
    station_id integer NOT NULL,
    CONSTRAINT stationmeta_global_climatic_zone_check CHECK ((climatic_zone >= 0)),
    CONSTRAINT stationmeta_global_dominant_landcover_year2012_check CHECK ((dominant_landcover_year2012 >= 0)),
    CONSTRAINT stationmeta_global_htap_region_tier1_check CHECK ((htap_region_tier1 >= 0)),
    CONSTRAINT stationmeta_global_toar1_category_check CHECK ((toar1_category >= 0))
);


ALTER TABLE public.stationmeta_global OWNER TO toaradmin;

--
-- Name: stationmeta_global_id_seq; Type: SEQUENCE; Schema: public; Owner: toaradmin
--

CREATE SEQUENCE public.stationmeta_global_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.stationmeta_global_id_seq OWNER TO toaradmin;

--
-- Name: stationmeta_global_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: toaradmin
--

ALTER SEQUENCE public.stationmeta_global_id_seq OWNED BY public.stationmeta_global.id;


--
-- Name: stationmeta_global_services; Type: TABLE; Schema: public; Owner: toaradmin
--

CREATE TABLE public.stationmeta_global_services (
    id integer NOT NULL,
    variable_name character varying(64) NOT NULL,
    result_type integer NOT NULL,
    result_nvalues integer NOT NULL,
    service_valid_year integer,
    service_url character varying(200) NOT NULL,
    CONSTRAINT stationmeta_global_services_result_nvalues_check CHECK ((result_nvalues >= 0)),
    CONSTRAINT stationmeta_global_services_result_type_check CHECK ((result_type >= 0)),
    CONSTRAINT stationmeta_global_services_service_valid_year_check CHECK ((service_valid_year >= 0))
);


ALTER TABLE public.stationmeta_global_services OWNER TO toaradmin;

--
-- Name: stationmeta_global_services_id_seq; Type: SEQUENCE; Schema: public; Owner: toaradmin
--

CREATE SEQUENCE public.stationmeta_global_services_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.stationmeta_global_services_id_seq OWNER TO toaradmin;

--
-- Name: stationmeta_global_services_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: toaradmin
--

ALTER SEQUENCE public.stationmeta_global_services_id_seq OWNED BY public.stationmeta_global_services.id;


--
-- Name: timeseries; Type: TABLE; Schema: public; Owner: toaradmin
--

CREATE TABLE public.timeseries (
    id integer NOT NULL,
    label character varying(128) NOT NULL,
    "order" integer NOT NULL,
    access_rights integer NOT NULL,
    sampling_frequency integer NOT NULL,
    aggregation integer NOT NULL,
    data_start_date timestamp with time zone NOT NULL,
    data_end_date timestamp with time zone NOT NULL,
    measurement_method character varying(128) NOT NULL,
    sampling_height double precision NOT NULL,
    additional_metadata jsonb NOT NULL,
    date_added timestamp with time zone NOT NULL,
    date_modified timestamp with time zone NOT NULL,
    station_id integer,
    variable_id integer,
    CONSTRAINT timeseries_access_rights_check CHECK ((access_rights >= 0)),
    CONSTRAINT timeseries_aggregation_check CHECK ((aggregation >= 0)),
    CONSTRAINT timeseries_order_check CHECK (("order" >= 0)),
    CONSTRAINT timeseries_sampling_frequency_check CHECK ((sampling_frequency >= 0))
);


ALTER TABLE public.timeseries OWNER TO toaradmin;

--
-- Name: timeseries_annotations; Type: TABLE; Schema: public; Owner: toaradmin
--

CREATE TABLE public.timeseries_annotations (
    id integer NOT NULL,
    kind integer NOT NULL,
    text text NOT NULL,
    date_added timestamp with time zone NOT NULL,
    approved boolean NOT NULL,
    contributor_id integer NOT NULL,
    timeseries_id integer NOT NULL,
    CONSTRAINT timeseries_annotations_kind_check CHECK ((kind >= 0))
);


ALTER TABLE public.timeseries_annotations OWNER TO toaradmin;

--
-- Name: timeseries_annotations_id_seq; Type: SEQUENCE; Schema: public; Owner: toaradmin
--

CREATE SEQUENCE public.timeseries_annotations_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.timeseries_annotations_id_seq OWNER TO toaradmin;

--
-- Name: timeseries_annotations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: toaradmin
--

ALTER SEQUENCE public.timeseries_annotations_id_seq OWNED BY public.timeseries_annotations.id;


--
-- Name: timeseries_id_seq; Type: SEQUENCE; Schema: public; Owner: toaradmin
--

CREATE SEQUENCE public.timeseries_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.timeseries_id_seq OWNER TO toaradmin;

--
-- Name: timeseries_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: toaradmin
--

ALTER SEQUENCE public.timeseries_id_seq OWNED BY public.timeseries.id;


--
-- Name: timeseries_programmes; Type: TABLE; Schema: public; Owner: toaradmin
--

CREATE TABLE public.timeseries_programmes (
    id integer NOT NULL,
    name character varying(32) NOT NULL,
    longname character varying(128) NOT NULL,
    homepage character varying(200) NOT NULL,
    description text NOT NULL
);


ALTER TABLE public.timeseries_programmes OWNER TO toaradmin;

--
-- Name: timeseries_programmes_id_seq; Type: SEQUENCE; Schema: public; Owner: toaradmin
--

CREATE SEQUENCE public.timeseries_programmes_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.timeseries_programmes_id_seq OWNER TO toaradmin;

--
-- Name: timeseries_programmes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: toaradmin
--

ALTER SEQUENCE public.timeseries_programmes_id_seq OWNED BY public.timeseries_programmes.id;


--
-- Name: timeseries_roles; Type: TABLE; Schema: public; Owner: toaradmin
--

CREATE TABLE public.timeseries_roles (
    id integer NOT NULL,
    role integer NOT NULL,
    status integer NOT NULL,
    person_id integer NOT NULL,
    timeseries_id integer NOT NULL,
    CONSTRAINT timeseries_roles_role_check CHECK ((role >= 0)),
    CONSTRAINT timeseries_roles_status_check CHECK ((status >= 0))
);


ALTER TABLE public.timeseries_roles OWNER TO toaradmin;

--
-- Name: timeseries_roles_id_seq; Type: SEQUENCE; Schema: public; Owner: toaradmin
--

CREATE SEQUENCE public.timeseries_roles_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.timeseries_roles_id_seq OWNER TO toaradmin;

--
-- Name: timeseries_roles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: toaradmin
--

ALTER SEQUENCE public.timeseries_roles_id_seq OWNED BY public.timeseries_roles.id;


--
-- Name: variables; Type: TABLE; Schema: public; Owner: toaradmin
--

CREATE TABLE public.variables (
    id integer NOT NULL,
    name character varying(32) NOT NULL,
    longname character varying(128) NOT NULL,
    displayname character varying(128) NOT NULL,
    cf_standardname character varying(128) NOT NULL,
    units character varying(64) NOT NULL,
    chemical_formula character varying(128) NOT NULL
);


ALTER TABLE public.variables OWNER TO toaradmin;

--
-- Name: variables_id_seq; Type: SEQUENCE; Schema: public; Owner: toaradmin
--

CREATE SEQUENCE public.variables_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.variables_id_seq OWNER TO toaradmin;

--
-- Name: variables_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: toaradmin
--

ALTER SEQUENCE public.variables_id_seq OWNED BY public.variables.id;

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

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

--
-- Name: organisations id; Type: DEFAULT; Schema: public; Owner: toaradmin
--

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

--
-- Name: persons id; Type: DEFAULT; Schema: public; Owner: toaradmin
--

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

--
-- Name: stationmeta_roles id; Type: DEFAULT; Schema: public; Owner: toaradmin
--

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

--
-- Name: stationmeta_annotations id; Type: DEFAULT; Schema: public; Owner: toaradmin
--

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

--
-- Name: stationmeta_aux_doc id; Type: DEFAULT; Schema: public; Owner: toaradmin
--

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

--
-- Name: stationmeta_aux_image id; Type: DEFAULT; Schema: public; Owner: toaradmin
--

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

--
-- Name: stationmeta_aux_url id; Type: DEFAULT; Schema: public; Owner: toaradmin
--

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

--
-- Name: stationmeta_core id; Type: DEFAULT; Schema: public; Owner: toaradmin
--

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

--
-- Name: stationmeta_global id; Type: DEFAULT; Schema: public; Owner: toaradmin
--

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

--
-- Name: stationmeta_global_services id; Type: DEFAULT; Schema: public; Owner: toaradmin
--

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

--
-- Name: timeseries id; Type: DEFAULT; Schema: public; Owner: toaradmin
--

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

--
-- Name: timeseries_annotations id; Type: DEFAULT; Schema: public; Owner: toaradmin
--

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

--
-- Name: timeseries_programmes id; Type: DEFAULT; Schema: public; Owner: toaradmin
--

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

--
-- Name: timeseries_roles id; Type: DEFAULT; Schema: public; Owner: toaradmin
--

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

--
-- Name: variables id; Type: DEFAULT; Schema: public; Owner: toaradmin
--

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

--
-- Data for Name: spatial_ref_sys; Type: TABLE DATA; Schema: postgis; Owner: toaradmin
--

COPY postgis.spatial_ref_sys (srid, auth_name, auth_srid, srtext, proj4text) FROM stdin;
\.

--
-- Data for Name: auth_user; Type: TABLE DATA; Schema: public; Owner: toaradmin
--

COPY public.auth_user (id, password, last_login, is_superuser, username, first_name, last_name, email, is_staff, is_active, date_joined) FROM stdin;
2	pbkdf2_sha256$120000$e6mCx4B1ReAJ$oPEJck70m4p1i6TpAYMehDJ3h/DgSiqEa7juOAM2u3g=	\N	f	AnonymousUser	Anonymous	User		f	f	2020-03-03 13:32:29+01
1	pbkdf2_sha256$120000$rDFZcfbC78Lo$mkXG3yrd5nu7aEOSc8wK3O+61vRXHzywbj1ZnjqP/lo=	2020-03-12 11:48:36.61661+01	t	sschroeder			s.schroeder@fz-juelich.de	t	t	2020-03-03 13:30:11.393341+01
\.


--
-- Data for Name: data; Type: TABLE DATA; Schema: public; Owner: toaradmin
--

COPY public.data (datetime, value, flags, timeseries_id) FROM stdin;
2012-12-15 11:00:00+01	33.3530000000000015	0	3
2012-12-15 12:00:00+01	58.8589999999999947	0	3
2012-12-15 13:00:00+01	66.7060000000000031	0	3
2012-12-15 14:00:00+01	64.7439999999999998	0	3
2012-12-15 15:00:00+01	72.5919999999999987	0	3
2012-12-15 16:00:00+01	56.8969999999999985	0	3
2012-12-15 17:00:00+01	41.2010000000000005	0	3
2012-12-15 18:00:00+01	35.3149999999999977	0	3
2012-12-15 19:00:00+01	37.277000000000001	0	3
2012-12-15 20:00:00+01	31.3909999999999982	0	3
2012-12-15 21:00:00+01	23.5430000000000028	0	3
2012-12-15 22:00:00+01	7.84799999999999986	0	3
2012-12-15 23:00:00+01	1.96199999999999997	0	3
2012-12-16 09:00:00+01	3.92399999999999993	0	3
2012-12-16 10:00:00+01	9.8100000000000005	0	3
2012-12-16 11:00:00+01	31.3909999999999982	0	3
2012-12-16 12:00:00+01	52.972999999999999	0	3
2012-12-16 13:00:00+01	66.7060000000000031	0	3
2012-12-16 14:00:00+01	74.554000000000002	0	3
2012-12-16 15:00:00+01	74.554000000000002	0	3
2012-12-16 16:00:00+01	66.7060000000000031	0	3
2012-12-16 17:00:00+01	51.0110000000000028	0	3
2012-12-16 18:00:00+01	41.2010000000000005	0	3
2012-12-16 19:00:00+01	37.277000000000001	0	3
2012-12-16 20:00:00+01	31.3909999999999982	0	3
2012-12-16 21:00:00+01	21.5809999999999995	0	3
2012-12-16 22:00:00+01	13.7340000000000018	0	3
2012-12-16 23:00:00+01	13.7340000000000018	0	3
2012-12-17 00:00:00+01	7.84799999999999986	0	3
2012-12-17 01:00:00+01	15.6959999999999997	0	3
2012-12-17 02:00:00+01	11.7720000000000002	0	2
2012-12-17 03:00:00+01	13.7340000000000018	0	2
2012-12-17 04:00:00+01	19.620000000000001	0	2
2012-12-17 05:00:00+01	15.6959999999999997	0	2
2012-12-17 06:00:00+01	5.88600000000000012	0	2
2012-12-17 07:00:00+01	3.92399999999999993	0	2
2012-12-17 09:00:00+01	1.96199999999999997	0	2
2012-12-17 10:00:00+01	23.5430000000000028	0	2
2012-12-17 11:00:00+01	41.2010000000000005	0	2
2012-12-17 12:00:00+01	43.1630000000000038	0	2
2012-12-17 13:00:00+01	66.7060000000000031	0	2
2012-12-17 14:00:00+01	78.4780000000000086	0	2