diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 97017039..0c84d575 100755 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -31,8 +31,7 @@ public function boot() URL::forceScheme('https'); } -// if (true) { - if (Config::get('APP_DEBUG')) { + if (env('APP_DEBUG')) { DB::listen(function ($query) { Log::info( $query->sql, diff --git a/database/migrations/pgsql-schema.sql b/database/migrations/pgsql-schema.sql new file mode 100644 index 00000000..77baa43a --- /dev/null +++ b/database/migrations/pgsql-schema.sql @@ -0,0 +1,859 @@ +-- +-- PostgreSQL database dump +-- + +-- Dumped from database version 15.8 (Debian 15.8-0+deb12u1) +-- Dumped by pg_dump version 15.8 (Debian 15.8-0+deb12u1) + +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; + +SET default_tablespace = ''; + +SET default_table_access_method = heap; + +-- +-- Name: attributes; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.attributes ( + id bigint NOT NULL, + name character varying(255) NOT NULL, + "values" character varying(4096), + created_at timestamp(0) without time zone, + updated_at timestamp(0) without time zone +); + + +-- +-- Name: control_measure; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.control_measure ( + control_id integer NOT NULL, + measure_id integer NOT NULL +); + + +-- +-- Name: control_user; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.control_user ( + control_id integer NOT NULL, + user_id bigint NOT NULL +); + + +-- +-- Name: controls; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.controls ( + id integer NOT NULL, + name character varying(255) NOT NULL, + objective text, + input text, + model text, + indicator text, + action_plan text, + periodicity integer, + plan_date date NOT NULL, + realisation_date date, + observations text, + score integer, + note integer, + created_at timestamp(0) without time zone, + updated_at timestamp(0) without time zone, + next_id integer, + standard character varying(255), + attributes character varying(1024), + site character varying(255), + scope character varying(32), + status integer DEFAULT 0 NOT NULL +); + + +-- +-- Name: controls_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.controls_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: controls_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.controls_id_seq OWNED BY public.controls.id; + + +-- +-- Name: documents; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.documents ( + id bigint NOT NULL, + control_id integer NOT NULL, + filename character varying(255) NOT NULL, + mimetype character varying(255) NOT NULL, + size integer NOT NULL, + hash character varying(255) NOT NULL, + created_at timestamp(0) without time zone, + updated_at timestamp(0) without time zone +); + + +-- +-- Name: documents_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.documents_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: documents_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.documents_id_seq OWNED BY public.documents.id; + + +-- +-- Name: domains; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.domains ( + id integer NOT NULL, + title character varying(255) NOT NULL, + description character varying(255) NOT NULL, + created_at timestamp(0) without time zone, + updated_at timestamp(0) without time zone, + framework character varying(255) +); + + +-- +-- Name: domains_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.domains_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: domains_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.domains_id_seq OWNED BY public.domains.id; + + +-- +-- Name: measures; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.measures ( + id integer NOT NULL, + domain_id integer NOT NULL, + name character varying(255) NOT NULL, + clause character varying(255) NOT NULL, + objective text, + input text, + model text, + indicator text, + action_plan text, + created_at timestamp(0) without time zone, + updated_at timestamp(0) without time zone, + standard character varying(255), + attributes character varying(1024) +); + + +-- +-- Name: measures_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.measures_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: measures_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.measures_id_seq OWNED BY public.measures.id; + + +-- +-- Name: migrations; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.migrations ( + id integer NOT NULL, + migration character varying(255) NOT NULL, + batch integer NOT NULL +); + + +-- +-- Name: migrations_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.migrations_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: migrations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.migrations_id_seq OWNED BY public.migrations.id; + + +-- +-- Name: oauth_access_tokens; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.oauth_access_tokens ( + id character varying(100) NOT NULL, + user_id bigint, + client_id bigint NOT NULL, + name character varying(255), + scopes text, + revoked boolean NOT NULL, + created_at timestamp(0) without time zone, + updated_at timestamp(0) without time zone, + expires_at timestamp(0) without time zone +); + + +-- +-- Name: oauth_auth_codes; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.oauth_auth_codes ( + id character varying(100) NOT NULL, + user_id bigint NOT NULL, + client_id bigint NOT NULL, + scopes text, + revoked boolean NOT NULL, + expires_at timestamp(0) without time zone +); + + +-- +-- Name: oauth_clients; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.oauth_clients ( + id bigint NOT NULL, + user_id bigint, + name character varying(255) NOT NULL, + secret character varying(100), + provider character varying(255), + redirect text NOT NULL, + personal_access_client boolean NOT NULL, + password_client boolean NOT NULL, + revoked boolean NOT NULL, + created_at timestamp(0) without time zone, + updated_at timestamp(0) without time zone +); + + +-- +-- Name: oauth_clients_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.oauth_clients_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: oauth_clients_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.oauth_clients_id_seq OWNED BY public.oauth_clients.id; + + +-- +-- Name: oauth_personal_access_clients; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.oauth_personal_access_clients ( + id bigint NOT NULL, + client_id bigint NOT NULL, + created_at timestamp(0) without time zone, + updated_at timestamp(0) without time zone +); + + +-- +-- Name: oauth_personal_access_clients_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.oauth_personal_access_clients_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: oauth_personal_access_clients_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.oauth_personal_access_clients_id_seq OWNED BY public.oauth_personal_access_clients.id; + + +-- +-- Name: oauth_refresh_tokens; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.oauth_refresh_tokens ( + id character varying(100) NOT NULL, + access_token_id character varying(100) NOT NULL, + revoked boolean NOT NULL, + expires_at timestamp(0) without time zone +); + + +-- +-- Name: password_resets; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.password_resets ( + email character varying(255) NOT NULL, + token character varying(255) NOT NULL, + created_at timestamp(0) without time zone +); + + +-- +-- Name: personal_access_tokens; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.personal_access_tokens ( + id bigint NOT NULL, + tokenable_type character varying(255) NOT NULL, + tokenable_id bigint NOT NULL, + name character varying(255) NOT NULL, + token character varying(64) NOT NULL, + abilities text, + last_used_at timestamp(0) without time zone, + expires_at timestamp(0) without time zone, + created_at timestamp(0) without time zone, + updated_at timestamp(0) without time zone +); + + +-- +-- Name: personal_access_tokens_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.personal_access_tokens_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: personal_access_tokens_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.personal_access_tokens_id_seq OWNED BY public.personal_access_tokens.id; + + +-- +-- Name: tags_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.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 public.tags_id_seq OWNED BY public.attributes.id; + + +-- +-- Name: users; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.users ( + id bigint NOT NULL, + login character varying(255) NOT NULL, + name character varying(255) NOT NULL, + email character varying(255) NOT NULL, + title character varying(255) NOT NULL, + role integer NOT NULL, + profile_image integer, + email_verified_at timestamp(0) without time zone, + password character varying(255) NOT NULL, + remember_token character varying(100), + created_at timestamp(0) without time zone, + updated_at timestamp(0) without time zone, + language character varying(255) +); + + +-- +-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.users_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id; + + +-- +-- Name: attributes id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.attributes ALTER COLUMN id SET DEFAULT nextval('public.tags_id_seq'::regclass); + + +-- +-- Name: controls id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.controls ALTER COLUMN id SET DEFAULT nextval('public.controls_id_seq'::regclass); + + +-- +-- Name: documents id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.documents ALTER COLUMN id SET DEFAULT nextval('public.documents_id_seq'::regclass); + + +-- +-- Name: domains id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.domains ALTER COLUMN id SET DEFAULT nextval('public.domains_id_seq'::regclass); + + +-- +-- Name: measures id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.measures ALTER COLUMN id SET DEFAULT nextval('public.measures_id_seq'::regclass); + + +-- +-- Name: migrations id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.migrations ALTER COLUMN id SET DEFAULT nextval('public.migrations_id_seq'::regclass); + + +-- +-- Name: oauth_clients id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.oauth_clients ALTER COLUMN id SET DEFAULT nextval('public.oauth_clients_id_seq'::regclass); + + +-- +-- Name: oauth_personal_access_clients id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.oauth_personal_access_clients ALTER COLUMN id SET DEFAULT nextval('public.oauth_personal_access_clients_id_seq'::regclass); + + +-- +-- Name: personal_access_tokens id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.personal_access_tokens ALTER COLUMN id SET DEFAULT nextval('public.personal_access_tokens_id_seq'::regclass); + + +-- +-- Name: users id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass); + + +-- +-- Name: controls controls_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.controls + ADD CONSTRAINT controls_pkey PRIMARY KEY (id); + + +-- +-- Name: documents documents_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.documents + ADD CONSTRAINT documents_pkey PRIMARY KEY (id); + + +-- +-- Name: domains domains_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.domains + ADD CONSTRAINT domains_pkey PRIMARY KEY (id); + + +-- +-- Name: measures measures_clause_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.measures + ADD CONSTRAINT measures_clause_unique UNIQUE (clause); + + +-- +-- Name: measures measures_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.measures + ADD CONSTRAINT measures_pkey PRIMARY KEY (id); + + +-- +-- Name: migrations migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.migrations + ADD CONSTRAINT migrations_pkey PRIMARY KEY (id); + + +-- +-- Name: oauth_access_tokens oauth_access_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.oauth_access_tokens + ADD CONSTRAINT oauth_access_tokens_pkey PRIMARY KEY (id); + + +-- +-- Name: oauth_auth_codes oauth_auth_codes_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.oauth_auth_codes + ADD CONSTRAINT oauth_auth_codes_pkey PRIMARY KEY (id); + + +-- +-- Name: oauth_clients oauth_clients_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.oauth_clients + ADD CONSTRAINT oauth_clients_pkey PRIMARY KEY (id); + + +-- +-- Name: oauth_personal_access_clients oauth_personal_access_clients_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.oauth_personal_access_clients + ADD CONSTRAINT oauth_personal_access_clients_pkey PRIMARY KEY (id); + + +-- +-- Name: oauth_refresh_tokens oauth_refresh_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.oauth_refresh_tokens + ADD CONSTRAINT oauth_refresh_tokens_pkey PRIMARY KEY (id); + + +-- +-- Name: personal_access_tokens personal_access_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.personal_access_tokens + ADD CONSTRAINT personal_access_tokens_pkey PRIMARY KEY (id); + + +-- +-- Name: personal_access_tokens personal_access_tokens_token_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.personal_access_tokens + ADD CONSTRAINT personal_access_tokens_token_unique UNIQUE (token); + + +-- +-- Name: attributes tags_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.attributes + ADD CONSTRAINT tags_name_unique UNIQUE (name); + + +-- +-- Name: attributes tags_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.attributes + ADD CONSTRAINT tags_pkey PRIMARY KEY (id); + + +-- +-- Name: users users_email_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.users + ADD CONSTRAINT users_email_unique UNIQUE (email); + + +-- +-- Name: users users_login_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.users + ADD CONSTRAINT users_login_unique UNIQUE (login); + + +-- +-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.users + ADD CONSTRAINT users_pkey PRIMARY KEY (id); + + +-- +-- Name: control_id_fk_5920381; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX control_id_fk_5920381 ON public.control_user USING btree (control_id); + + +-- +-- Name: oauth_access_tokens_user_id_index; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX oauth_access_tokens_user_id_index ON public.oauth_access_tokens USING btree (user_id); + + +-- +-- Name: oauth_auth_codes_user_id_index; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX oauth_auth_codes_user_id_index ON public.oauth_auth_codes USING btree (user_id); + + +-- +-- Name: oauth_clients_user_id_index; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX oauth_clients_user_id_index ON public.oauth_clients USING btree (user_id); + + +-- +-- Name: oauth_refresh_tokens_access_token_id_index; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX oauth_refresh_tokens_access_token_id_index ON public.oauth_refresh_tokens USING btree (access_token_id); + + +-- +-- Name: password_resets_email_index; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX password_resets_email_index ON public.password_resets USING btree (email); + + +-- +-- Name: personal_access_tokens_tokenable_type_tokenable_id_index; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX personal_access_tokens_tokenable_type_tokenable_id_index ON public.personal_access_tokens USING btree (tokenable_type, tokenable_id); + + +-- +-- Name: user_id_fk_5837573; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX user_id_fk_5837573 ON public.control_user USING btree (user_id); + + +-- +-- Name: control_user control_id_fk_49294573; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.control_user + ADD CONSTRAINT control_id_fk_49294573 FOREIGN KEY (control_id) REFERENCES public.controls(id) ON DELETE CASCADE; + + +-- +-- Name: control_measure control_measure_control_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.control_measure + ADD CONSTRAINT control_measure_control_id_foreign FOREIGN KEY (control_id) REFERENCES public.controls(id); + + +-- +-- Name: control_measure control_measure_measure_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.control_measure + ADD CONSTRAINT control_measure_measure_id_foreign FOREIGN KEY (measure_id) REFERENCES public.measures(id); + + +-- +-- Name: documents documents_control_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.documents + ADD CONSTRAINT documents_control_id_foreign FOREIGN KEY (control_id) REFERENCES public.controls(id); + + +-- +-- Name: controls fk_controls_next_id; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.controls + ADD CONSTRAINT fk_controls_next_id FOREIGN KEY (next_id) REFERENCES public.controls(id); + + +-- +-- Name: measures measures_domain_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.measures + ADD CONSTRAINT measures_domain_id_foreign FOREIGN KEY (domain_id) REFERENCES public.domains(id); + + +-- +-- Name: control_user user_id_fk_304958543; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.control_user + ADD CONSTRAINT user_id_fk_304958543 FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE; + + +-- +-- PostgreSQL database dump complete +-- + +-- +-- PostgreSQL database dump +-- + +-- Dumped from database version 15.8 (Debian 15.8-0+deb12u1) +-- Dumped by pg_dump version 15.8 (Debian 15.8-0+deb12u1) + +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; + +-- +-- Data for Name: migrations; Type: TABLE DATA; Schema: public; Owner: - +-- + +COPY public.migrations (id, migration, batch) FROM stdin; +1 2014_10_12_000000_create_users_table 1 +2 2014_10_12_100000_create_password_resets_table 1 +3 2016_06_01_000001_create_oauth_auth_codes_table 1 +4 2016_06_01_000002_create_oauth_access_tokens_table 1 +5 2016_06_01_000003_create_oauth_refresh_tokens_table 1 +6 2016_06_01_000004_create_oauth_clients_table 1 +7 2016_06_01_000005_create_oauth_personal_access_clients_table 1 +8 2019_07_28_175941_create_domains_table 1 +9 2019_08_09_084322_create_measures_table 1 +10 2019_08_09_105245_create_controls_table 1 +11 2019_12_14_000001_create_personal_access_tokens_table 1 +12 2020_04_12_073028_create_documents_table 1 +13 2022_04_23_081110_add_next_control_id 1 +14 2022_05_15_030940_control_score_to_int 1 +15 2022_12_21_113730_add_user_language 1 +16 2023_01_29_114100_add_tags 1 +17 2023_01_30_180336_normalization 1 +18 2023_03_09_222639_alter_attributes_values 1 +19 2023_04_06_202034_alter_attribute_length 1 +20 2023_04_19_112145_change_clause_type 1 +21 2023_06_18_170340_owner 1 +22 2023_08_22_095642_add_scope 1 +23 2024_04_15_193546_attributes_values_text 1 +24 2024_04_20_192325_add_control_status 1 +25 2024_06_27_123923_add_control_measure_table 1 +26 2024_07_02_101657_add_framework_to_domains 1 +27 2024_07_05_174735_clause_unique 1 +28 2024_10_01_181052_remove_clause 1 +\. + + +-- +-- Name: migrations_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - +-- + +SELECT pg_catalog.setval('public.migrations_id_seq', 28, true); + + +-- +-- PostgreSQL database dump complete +-- + diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index 5db16c29..9be46ae8 100644 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -12,12 +12,16 @@ class DatabaseSeeder extends Seeder */ public function run() { + $lang = ENV('LANG'); + if (($lang!=="fr")&&($lang!=="de")) + $lang="en"; + DB::table('users')->insert([ 'login' => 'admin', 'name' => 'Administrator', 'title' => 'Pirate Captain', 'role' => 1, - 'language' => 'en', + 'language' => $lang, 'email' => 'admin@admin.localhost', 'password' => bcrypt('admin'), ]);