1251 lines
28 KiB
SQL
1251 lines
28 KiB
SQL
--
|
|
-- PostgreSQL database dump
|
|
--
|
|
|
|
-- Dumped from database version 9.6.4
|
|
-- Dumped by pg_dump version 9.6.4
|
|
|
|
SET statement_timeout = 0;
|
|
SET lock_timeout = 0;
|
|
SET idle_in_transaction_session_timeout = 0;
|
|
SET client_encoding = 'UTF8';
|
|
SET standard_conforming_strings = on;
|
|
SET check_function_bodies = false;
|
|
SET client_min_messages = warning;
|
|
SET row_security = off;
|
|
|
|
--
|
|
-- 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: 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: pg_trgm; Type: EXTENSION; Schema: -; Owner: -
|
|
--
|
|
|
|
CREATE EXTENSION IF NOT EXISTS pg_trgm WITH SCHEMA public;
|
|
|
|
|
|
--
|
|
-- Name: EXTENSION pg_trgm; Type: COMMENT; Schema: -; Owner: -
|
|
--
|
|
|
|
COMMENT ON EXTENSION pg_trgm IS 'text similarity measurement and index searching based on trigrams';
|
|
|
|
|
|
--
|
|
-- Name: unaccent; Type: EXTENSION; Schema: -; Owner: -
|
|
--
|
|
|
|
CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public;
|
|
|
|
|
|
--
|
|
-- Name: EXTENSION unaccent; Type: COMMENT; Schema: -; Owner: -
|
|
--
|
|
|
|
COMMENT ON EXTENSION unaccent IS 'text search dictionary that removes accents';
|
|
|
|
|
|
SET search_path = public, pg_catalog;
|
|
|
|
--
|
|
-- Name: pg_search_dmetaphone(text); Type: FUNCTION; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE FUNCTION pg_search_dmetaphone(text) RETURNS text
|
|
LANGUAGE sql IMMUTABLE STRICT
|
|
AS $_$
|
|
SELECT array_to_string(ARRAY(SELECT dmetaphone(unnest(regexp_split_to_array($1, E'\\s+')))), ' ')
|
|
$_$;
|
|
|
|
|
|
SET default_tablespace = '';
|
|
|
|
SET default_with_oids = false;
|
|
|
|
--
|
|
-- Name: admins; Type: TABLE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE TABLE admins (
|
|
id integer NOT NULL,
|
|
name character varying(255),
|
|
firstname character varying(255),
|
|
avatar character varying(255),
|
|
username character varying(255) DEFAULT ''::character varying NOT NULL,
|
|
email character varying(255) DEFAULT ''::character varying NOT NULL,
|
|
password_digest character varying(255) DEFAULT ''::character varying NOT NULL,
|
|
reset_password_token character varying(255),
|
|
reset_password_sent_at timestamp without time zone,
|
|
remember_created_at timestamp without time zone,
|
|
sign_in_count integer DEFAULT 0,
|
|
current_sign_in_at timestamp without time zone,
|
|
last_sign_in_at timestamp without time zone,
|
|
current_sign_in_ip character varying(255),
|
|
last_sign_in_ip character varying(255),
|
|
remember_token character varying(255),
|
|
created_at timestamp without time zone,
|
|
updated_at timestamp without time zone,
|
|
cms boolean,
|
|
transactions boolean,
|
|
orders boolean,
|
|
petitions boolean,
|
|
donators boolean,
|
|
newsletter boolean,
|
|
moderateur boolean
|
|
);
|
|
|
|
|
|
--
|
|
-- Name: admins_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE SEQUENCE admins_id_seq
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
|
|
|
|
--
|
|
-- Name: admins_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER SEQUENCE admins_id_seq OWNED BY admins.id;
|
|
|
|
|
|
--
|
|
-- Name: album_folders; Type: TABLE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE TABLE album_folders (
|
|
id integer NOT NULL,
|
|
name character varying(255),
|
|
description text,
|
|
parent_id integer,
|
|
created_at timestamp without time zone NOT NULL,
|
|
updated_at timestamp without time zone NOT NULL,
|
|
images_count_cache integer
|
|
);
|
|
|
|
|
|
--
|
|
-- Name: album_folders_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE SEQUENCE album_folders_id_seq
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
|
|
|
|
--
|
|
-- Name: album_folders_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER SEQUENCE album_folders_id_seq OWNED BY album_folders.id;
|
|
|
|
|
|
--
|
|
-- Name: albums; Type: TABLE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE TABLE albums (
|
|
id integer NOT NULL,
|
|
name character varying(255),
|
|
super_admin boolean,
|
|
created_at timestamp without time zone,
|
|
updated_at timestamp without time zone,
|
|
parent_id integer,
|
|
album_folder_id integer,
|
|
images_count_cache integer
|
|
);
|
|
|
|
|
|
--
|
|
-- Name: albums_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE SEQUENCE albums_id_seq
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
|
|
|
|
--
|
|
-- Name: albums_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER SEQUENCE albums_id_seq OWNED BY albums.id;
|
|
|
|
|
|
--
|
|
-- Name: categories; Type: TABLE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE TABLE categories (
|
|
id integer NOT NULL,
|
|
name character varying(255),
|
|
slug character varying(255),
|
|
enabled boolean,
|
|
description text,
|
|
image_file_id integer,
|
|
"position" integer,
|
|
parent_id integer,
|
|
permalink character varying(255),
|
|
front_page boolean,
|
|
created_at timestamp without time zone,
|
|
updated_at timestamp without time zone
|
|
);
|
|
|
|
|
|
--
|
|
-- Name: categories_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE SEQUENCE categories_id_seq
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
|
|
|
|
--
|
|
-- Name: categories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER SEQUENCE categories_id_seq OWNED BY categories.id;
|
|
|
|
|
|
--
|
|
-- Name: data_file_categories; Type: TABLE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE TABLE data_file_categories (
|
|
id integer NOT NULL,
|
|
name character varying(255),
|
|
slug character varying(255),
|
|
parent_id integer,
|
|
created_at timestamp without time zone NOT NULL,
|
|
updated_at timestamp without time zone NOT NULL
|
|
);
|
|
|
|
|
|
--
|
|
-- Name: data_file_categories_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE SEQUENCE data_file_categories_id_seq
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
|
|
|
|
--
|
|
-- Name: data_file_categories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER SEQUENCE data_file_categories_id_seq OWNED BY data_file_categories.id;
|
|
|
|
|
|
--
|
|
-- Name: data_files; Type: TABLE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE TABLE data_files (
|
|
id integer NOT NULL,
|
|
file character varying(255),
|
|
name character varying(255),
|
|
slug character varying(255),
|
|
token character varying(255),
|
|
description character varying(255),
|
|
file_folder_id integer,
|
|
created_at timestamp without time zone,
|
|
updated_at timestamp without time zone,
|
|
title character varying(255),
|
|
long_desc text,
|
|
boutique boolean,
|
|
data_file_category_id integer,
|
|
image_file_id integer,
|
|
yumpu_content text,
|
|
show_yumpu boolean
|
|
);
|
|
|
|
|
|
--
|
|
-- Name: data_files_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE SEQUENCE data_files_id_seq
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
|
|
|
|
--
|
|
-- Name: data_files_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER SEQUENCE data_files_id_seq OWNED BY data_files.id;
|
|
|
|
|
|
--
|
|
-- Name: file_folders; Type: TABLE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE TABLE file_folders (
|
|
id integer NOT NULL,
|
|
name character varying(255),
|
|
super_admin boolean,
|
|
created_at timestamp without time zone,
|
|
updated_at timestamp without time zone
|
|
);
|
|
|
|
|
|
--
|
|
-- Name: file_folders_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE SEQUENCE file_folders_id_seq
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
|
|
|
|
--
|
|
-- Name: file_folders_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER SEQUENCE file_folders_id_seq OWNED BY file_folders.id;
|
|
|
|
|
|
--
|
|
-- Name: hashtaggings; Type: TABLE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE TABLE hashtaggings (
|
|
id integer NOT NULL,
|
|
hashtag_id integer,
|
|
hashtaggable_id integer,
|
|
hashtaggable_type character varying(255),
|
|
lang_site_id integer,
|
|
created_at timestamp without time zone NOT NULL,
|
|
updated_at timestamp without time zone NOT NULL
|
|
);
|
|
|
|
|
|
--
|
|
-- Name: hashtaggings_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE SEQUENCE hashtaggings_id_seq
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
|
|
|
|
--
|
|
-- Name: hashtaggings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER SEQUENCE hashtaggings_id_seq OWNED BY hashtaggings.id;
|
|
|
|
|
|
--
|
|
-- Name: hashtags; Type: TABLE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE TABLE hashtags (
|
|
id integer NOT NULL,
|
|
name character varying(255),
|
|
enabled boolean,
|
|
lang_site_id integer,
|
|
created_at timestamp without time zone NOT NULL,
|
|
updated_at timestamp without time zone NOT NULL,
|
|
slug character varying(255)
|
|
);
|
|
|
|
|
|
--
|
|
-- Name: hashtags_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE SEQUENCE hashtags_id_seq
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
|
|
|
|
--
|
|
-- Name: hashtags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER SEQUENCE hashtags_id_seq OWNED BY hashtags.id;
|
|
|
|
|
|
--
|
|
-- Name: image_errors; Type: TABLE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE TABLE image_errors (
|
|
id integer NOT NULL,
|
|
path character varying(255),
|
|
created_at timestamp without time zone NOT NULL,
|
|
updated_at timestamp without time zone NOT NULL
|
|
);
|
|
|
|
|
|
--
|
|
-- Name: image_errors_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE SEQUENCE image_errors_id_seq
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
|
|
|
|
--
|
|
-- Name: image_errors_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER SEQUENCE image_errors_id_seq OWNED BY image_errors.id;
|
|
|
|
|
|
--
|
|
-- Name: image_file_share_images; Type: TABLE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE TABLE image_file_share_images (
|
|
id integer NOT NULL,
|
|
image_file_id integer,
|
|
share_image_id integer,
|
|
created_at timestamp without time zone NOT NULL,
|
|
updated_at timestamp without time zone NOT NULL
|
|
);
|
|
|
|
|
|
--
|
|
-- Name: image_file_share_images_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE SEQUENCE image_file_share_images_id_seq
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
|
|
|
|
--
|
|
-- Name: image_file_share_images_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER SEQUENCE image_file_share_images_id_seq OWNED BY image_file_share_images.id;
|
|
|
|
|
|
--
|
|
-- Name: image_files; Type: TABLE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE TABLE image_files (
|
|
id integer NOT NULL,
|
|
file character varying(255),
|
|
name character varying(255),
|
|
slug character varying(255),
|
|
description text,
|
|
tags character varying(255),
|
|
album_id integer,
|
|
photograph character varying(255),
|
|
cible_type character varying(255),
|
|
cible_id integer,
|
|
created_at timestamp without time zone,
|
|
updated_at timestamp without time zone,
|
|
origin_name character varying(255),
|
|
token_s character varying(255),
|
|
buy boolean DEFAULT false,
|
|
one_voice boolean DEFAULT false,
|
|
classified boolean DEFAULT false,
|
|
icloud_id character varying(255),
|
|
imported boolean DEFAULT false,
|
|
xml_content text,
|
|
altitude numeric(12,8),
|
|
latitude numeric(12,8),
|
|
longitude numeric(12,8),
|
|
xml_ok boolean,
|
|
tsv_tsearch tsvector,
|
|
tags_cache text
|
|
);
|
|
|
|
|
|
--
|
|
-- Name: image_files_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE SEQUENCE image_files_id_seq
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
|
|
|
|
--
|
|
-- Name: image_files_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER SEQUENCE image_files_id_seq OWNED BY image_files.id;
|
|
|
|
|
|
--
|
|
-- Name: lang_sites; Type: TABLE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE TABLE lang_sites (
|
|
id integer NOT NULL,
|
|
name character varying(255),
|
|
slug character varying(255),
|
|
enabled boolean,
|
|
created_at timestamp without time zone NOT NULL,
|
|
updated_at timestamp without time zone NOT NULL
|
|
);
|
|
|
|
|
|
--
|
|
-- Name: lang_sites_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE SEQUENCE lang_sites_id_seq
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
|
|
|
|
--
|
|
-- Name: lang_sites_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER SEQUENCE lang_sites_id_seq OWNED BY lang_sites.id;
|
|
|
|
|
|
--
|
|
-- Name: photo_provisoires; Type: TABLE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE TABLE photo_provisoires (
|
|
id integer NOT NULL,
|
|
album_id integer,
|
|
photo_id character varying(255),
|
|
created_at timestamp without time zone NOT NULL,
|
|
updated_at timestamp without time zone NOT NULL
|
|
);
|
|
|
|
|
|
--
|
|
-- Name: photo_provisoires_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE SEQUENCE photo_provisoires_id_seq
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
|
|
|
|
--
|
|
-- Name: photo_provisoires_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER SEQUENCE photo_provisoires_id_seq OWNED BY photo_provisoires.id;
|
|
|
|
|
|
--
|
|
-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE TABLE schema_migrations (
|
|
version character varying NOT NULL
|
|
);
|
|
|
|
|
|
--
|
|
-- Name: share_images; Type: TABLE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE TABLE share_images (
|
|
id integer NOT NULL,
|
|
title character varying(255),
|
|
slug character varying(255),
|
|
password character varying(255),
|
|
description text,
|
|
expiration date,
|
|
created_at timestamp without time zone NOT NULL,
|
|
updated_at timestamp without time zone NOT NULL
|
|
);
|
|
|
|
|
|
--
|
|
-- Name: share_images_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE SEQUENCE share_images_id_seq
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
|
|
|
|
--
|
|
-- Name: share_images_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER SEQUENCE share_images_id_seq OWNED BY share_images.id;
|
|
|
|
|
|
--
|
|
-- Name: tag_taggables; Type: TABLE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE TABLE tag_taggables (
|
|
id integer NOT NULL,
|
|
taggable_type character varying(255),
|
|
taggable_id integer,
|
|
tag_id integer,
|
|
created_at timestamp without time zone,
|
|
updated_at timestamp without time zone
|
|
);
|
|
|
|
|
|
--
|
|
-- Name: tag_taggables_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE SEQUENCE tag_taggables_id_seq
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
|
|
|
|
--
|
|
-- Name: tag_taggables_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER SEQUENCE tag_taggables_id_seq OWNED BY tag_taggables.id;
|
|
|
|
|
|
--
|
|
-- Name: tags; Type: TABLE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE TABLE tags (
|
|
id integer NOT NULL,
|
|
name character varying(255),
|
|
slug character varying(255),
|
|
parent_id integer,
|
|
public boolean,
|
|
taggable_type character varying(255),
|
|
taggable_id integer,
|
|
created_at timestamp without time zone,
|
|
updated_at timestamp without time zone,
|
|
child_count integer
|
|
);
|
|
|
|
|
|
--
|
|
-- Name: tags_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE SEQUENCE tags_id_seq
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
|
|
|
|
--
|
|
-- Name: tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER SEQUENCE tags_id_seq OWNED BY tags.id;
|
|
|
|
|
|
--
|
|
-- Name: tiny_urls; Type: TABLE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE TABLE tiny_urls (
|
|
id integer NOT NULL,
|
|
url character varying(255),
|
|
slug character varying(255),
|
|
description text,
|
|
start_at timestamp without time zone,
|
|
stop_at timestamp without time zone,
|
|
nbr_views integer,
|
|
created_at timestamp without time zone,
|
|
updated_at timestamp without time zone
|
|
);
|
|
|
|
|
|
--
|
|
-- Name: tiny_urls_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE SEQUENCE tiny_urls_id_seq
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
|
|
|
|
--
|
|
-- Name: tiny_urls_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER SEQUENCE tiny_urls_id_seq OWNED BY tiny_urls.id;
|
|
|
|
|
|
--
|
|
-- Name: video_files; Type: TABLE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE TABLE video_files (
|
|
id integer NOT NULL,
|
|
title character varying(255),
|
|
description text,
|
|
token character varying(255),
|
|
poster character varying(255),
|
|
mpg character varying(255),
|
|
ogg character varying(255),
|
|
webm character varying(255),
|
|
youtube_link character varying(255),
|
|
youtube_code character varying(255),
|
|
video_folder_id integer,
|
|
created_at timestamp without time zone,
|
|
updated_at timestamp without time zone,
|
|
slug character varying(255),
|
|
vimeo_code character varying(255),
|
|
"position" integer,
|
|
fr boolean DEFAULT true,
|
|
en boolean DEFAULT false
|
|
);
|
|
|
|
|
|
--
|
|
-- Name: video_files_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE SEQUENCE video_files_id_seq
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
|
|
|
|
--
|
|
-- Name: video_files_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER SEQUENCE video_files_id_seq OWNED BY video_files.id;
|
|
|
|
|
|
--
|
|
-- Name: admins id; Type: DEFAULT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY admins ALTER COLUMN id SET DEFAULT nextval('admins_id_seq'::regclass);
|
|
|
|
|
|
--
|
|
-- Name: album_folders id; Type: DEFAULT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY album_folders ALTER COLUMN id SET DEFAULT nextval('album_folders_id_seq'::regclass);
|
|
|
|
|
|
--
|
|
-- Name: albums id; Type: DEFAULT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY albums ALTER COLUMN id SET DEFAULT nextval('albums_id_seq'::regclass);
|
|
|
|
|
|
--
|
|
-- Name: categories id; Type: DEFAULT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY categories ALTER COLUMN id SET DEFAULT nextval('categories_id_seq'::regclass);
|
|
|
|
|
|
--
|
|
-- Name: data_file_categories id; Type: DEFAULT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY data_file_categories ALTER COLUMN id SET DEFAULT nextval('data_file_categories_id_seq'::regclass);
|
|
|
|
|
|
--
|
|
-- Name: data_files id; Type: DEFAULT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY data_files ALTER COLUMN id SET DEFAULT nextval('data_files_id_seq'::regclass);
|
|
|
|
|
|
--
|
|
-- Name: file_folders id; Type: DEFAULT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY file_folders ALTER COLUMN id SET DEFAULT nextval('file_folders_id_seq'::regclass);
|
|
|
|
|
|
--
|
|
-- Name: hashtaggings id; Type: DEFAULT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY hashtaggings ALTER COLUMN id SET DEFAULT nextval('hashtaggings_id_seq'::regclass);
|
|
|
|
|
|
--
|
|
-- Name: hashtags id; Type: DEFAULT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY hashtags ALTER COLUMN id SET DEFAULT nextval('hashtags_id_seq'::regclass);
|
|
|
|
|
|
--
|
|
-- Name: image_errors id; Type: DEFAULT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY image_errors ALTER COLUMN id SET DEFAULT nextval('image_errors_id_seq'::regclass);
|
|
|
|
|
|
--
|
|
-- Name: image_file_share_images id; Type: DEFAULT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY image_file_share_images ALTER COLUMN id SET DEFAULT nextval('image_file_share_images_id_seq'::regclass);
|
|
|
|
|
|
--
|
|
-- Name: image_files id; Type: DEFAULT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY image_files ALTER COLUMN id SET DEFAULT nextval('image_files_id_seq'::regclass);
|
|
|
|
|
|
--
|
|
-- Name: lang_sites id; Type: DEFAULT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY lang_sites ALTER COLUMN id SET DEFAULT nextval('lang_sites_id_seq'::regclass);
|
|
|
|
|
|
--
|
|
-- Name: photo_provisoires id; Type: DEFAULT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY photo_provisoires ALTER COLUMN id SET DEFAULT nextval('photo_provisoires_id_seq'::regclass);
|
|
|
|
|
|
--
|
|
-- Name: share_images id; Type: DEFAULT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY share_images ALTER COLUMN id SET DEFAULT nextval('share_images_id_seq'::regclass);
|
|
|
|
|
|
--
|
|
-- Name: tag_taggables id; Type: DEFAULT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY tag_taggables ALTER COLUMN id SET DEFAULT nextval('tag_taggables_id_seq'::regclass);
|
|
|
|
|
|
--
|
|
-- Name: tags id; Type: DEFAULT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY tags ALTER COLUMN id SET DEFAULT nextval('tags_id_seq'::regclass);
|
|
|
|
|
|
--
|
|
-- Name: tiny_urls id; Type: DEFAULT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY tiny_urls ALTER COLUMN id SET DEFAULT nextval('tiny_urls_id_seq'::regclass);
|
|
|
|
|
|
--
|
|
-- Name: video_files id; Type: DEFAULT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY video_files ALTER COLUMN id SET DEFAULT nextval('video_files_id_seq'::regclass);
|
|
|
|
|
|
--
|
|
-- Name: admins admins_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY admins
|
|
ADD CONSTRAINT admins_pkey PRIMARY KEY (id);
|
|
|
|
|
|
--
|
|
-- Name: album_folders album_folders_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY album_folders
|
|
ADD CONSTRAINT album_folders_pkey PRIMARY KEY (id);
|
|
|
|
|
|
--
|
|
-- Name: albums albums_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY albums
|
|
ADD CONSTRAINT albums_pkey PRIMARY KEY (id);
|
|
|
|
|
|
--
|
|
-- Name: categories categories_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY categories
|
|
ADD CONSTRAINT categories_pkey PRIMARY KEY (id);
|
|
|
|
|
|
--
|
|
-- Name: data_file_categories data_file_categories_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY data_file_categories
|
|
ADD CONSTRAINT data_file_categories_pkey PRIMARY KEY (id);
|
|
|
|
|
|
--
|
|
-- Name: data_files data_files_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY data_files
|
|
ADD CONSTRAINT data_files_pkey PRIMARY KEY (id);
|
|
|
|
|
|
--
|
|
-- Name: file_folders file_folders_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY file_folders
|
|
ADD CONSTRAINT file_folders_pkey PRIMARY KEY (id);
|
|
|
|
|
|
--
|
|
-- Name: hashtaggings hashtaggings_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY hashtaggings
|
|
ADD CONSTRAINT hashtaggings_pkey PRIMARY KEY (id);
|
|
|
|
|
|
--
|
|
-- Name: hashtags hashtags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY hashtags
|
|
ADD CONSTRAINT hashtags_pkey PRIMARY KEY (id);
|
|
|
|
|
|
--
|
|
-- Name: image_errors image_errors_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY image_errors
|
|
ADD CONSTRAINT image_errors_pkey PRIMARY KEY (id);
|
|
|
|
|
|
--
|
|
-- Name: image_file_share_images image_file_share_images_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY image_file_share_images
|
|
ADD CONSTRAINT image_file_share_images_pkey PRIMARY KEY (id);
|
|
|
|
|
|
--
|
|
-- Name: image_files image_files_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY image_files
|
|
ADD CONSTRAINT image_files_pkey PRIMARY KEY (id);
|
|
|
|
|
|
--
|
|
-- Name: lang_sites lang_sites_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY lang_sites
|
|
ADD CONSTRAINT lang_sites_pkey PRIMARY KEY (id);
|
|
|
|
|
|
--
|
|
-- Name: photo_provisoires photo_provisoires_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY photo_provisoires
|
|
ADD CONSTRAINT photo_provisoires_pkey PRIMARY KEY (id);
|
|
|
|
|
|
--
|
|
-- Name: share_images share_images_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY share_images
|
|
ADD CONSTRAINT share_images_pkey PRIMARY KEY (id);
|
|
|
|
|
|
--
|
|
-- Name: tag_taggables tag_taggables_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY tag_taggables
|
|
ADD CONSTRAINT tag_taggables_pkey PRIMARY KEY (id);
|
|
|
|
|
|
--
|
|
-- Name: tags tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY tags
|
|
ADD CONSTRAINT tags_pkey PRIMARY KEY (id);
|
|
|
|
|
|
--
|
|
-- Name: tiny_urls tiny_urls_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY tiny_urls
|
|
ADD CONSTRAINT tiny_urls_pkey PRIMARY KEY (id);
|
|
|
|
|
|
--
|
|
-- Name: video_files video_files_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY video_files
|
|
ADD CONSTRAINT video_files_pkey PRIMARY KEY (id);
|
|
|
|
|
|
--
|
|
-- Name: index_data_files_on_image_file_id; Type: INDEX; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE INDEX index_data_files_on_image_file_id ON data_files USING btree (image_file_id);
|
|
|
|
|
|
--
|
|
-- Name: index_hashtaggings_on_hashtag_id; Type: INDEX; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE INDEX index_hashtaggings_on_hashtag_id ON hashtaggings USING btree (hashtag_id);
|
|
|
|
|
|
--
|
|
-- Name: index_image_file_share_images_on_image_file_id; Type: INDEX; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE INDEX index_image_file_share_images_on_image_file_id ON image_file_share_images USING btree (image_file_id);
|
|
|
|
|
|
--
|
|
-- Name: index_image_file_share_images_on_share_image_id; Type: INDEX; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE INDEX index_image_file_share_images_on_share_image_id ON image_file_share_images USING btree (share_image_id);
|
|
|
|
|
|
--
|
|
-- Name: index_image_files_on_tsv_tsearch; Type: INDEX; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE INDEX index_image_files_on_tsv_tsearch ON image_files USING gin (tsv_tsearch);
|
|
|
|
|
|
--
|
|
-- Name: index_video_files_on_video_folder_id; Type: INDEX; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE INDEX index_video_files_on_video_folder_id ON video_files USING btree (video_folder_id);
|
|
|
|
|
|
--
|
|
-- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations USING btree (version);
|
|
|
|
|
|
--
|
|
-- Name: image_files tsvectorupdate; Type: TRIGGER; Schema: public; Owner: -
|
|
--
|
|
|
|
CREATE TRIGGER tsvectorupdate BEFORE INSERT OR UPDATE ON image_files FOR EACH ROW EXECUTE PROCEDURE tsvector_update_trigger('tsv_tsearch', 'pg_catalog.french', 'name', 'description', 'photograph', 'origin_name', 'tags_cache');
|
|
|
|
|
|
--
|
|
-- Name: data_files fk_rails_a836dec976; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY data_files
|
|
ADD CONSTRAINT fk_rails_a836dec976 FOREIGN KEY (image_file_id) REFERENCES image_files(id);
|
|
|
|
|
|
--
|
|
-- Name: image_file_share_images fk_rails_d718ee5113; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY image_file_share_images
|
|
ADD CONSTRAINT fk_rails_d718ee5113 FOREIGN KEY (image_file_id) REFERENCES image_files(id);
|
|
|
|
|
|
--
|
|
-- Name: image_file_share_images fk_rails_faa932c685; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
--
|
|
|
|
ALTER TABLE ONLY image_file_share_images
|
|
ADD CONSTRAINT fk_rails_faa932c685 FOREIGN KEY (share_image_id) REFERENCES share_images(id);
|
|
|
|
|
|
--
|
|
-- PostgreSQL database dump complete
|
|
--
|
|
|
|
SET search_path TO "$user", public;
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('0');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('1');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('1010');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('1020');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('1030');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('200');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20150121195604');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20151207214941');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20151209135344');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20151209135549');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20151213153133');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20160104132939');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20160124212947');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20160418191643');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20160515162206');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20160516121833');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20160524131532');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20160524132015');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20160602080357');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20160609071648');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20161121084106');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20161121090344');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20161213164422');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20161214091513');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20161214091540');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20161215114214');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20161215114358');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20161217142257');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20161218134021');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20161218152543');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20161218155343');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20170130092928');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20170130093008');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20170820152749');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20170820155424');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('20170820184916');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('210');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('300');
|
|
|
|
INSERT INTO schema_migrations (version) VALUES ('310');
|
|
|