Jims Error in SB while restore new db from Live
There is a mismatch in the db structure for jims in Live and SB. The table named 'jala_core_settings' has been using in SB but its not in Live. While we restore the latest db from live, its missing and generate an error in some pages ( eg: Components-Water Supply View ). Temporarily we can import the table from old db available in SB to latest db OR execute the following dump. <source lang="sql" highlight="3">
SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET search_path = public, pg_catalog; SET default_with_oids = false;
-- -- Name: jala_core_settings; Type: TABLE; Schema: public; Owner: origami_dbadmin; Tablespace: --
CREATE TABLE jala_core_settings ( setting_id bigint NOT NULL, setting_type smallint, setting_data text[], setting_addedby bigint, setting_addedon timestamp without time zone, setting_last_editby bigint, setting_last_editon timestamp without time zone, t_created timestamp with time zone, t_modified timestamp with time zone, t_deleted timestamp with time zone, deleted smallint DEFAULT 0 );
ALTER TABLE public.jala_core_settings OWNER TO origami_dbadmin;
-- -- Name: TABLE jala_core_settings; Type: COMMENT; Schema: public; Owner: origami_dbadmin --
COMMENT ON TABLE jala_core_settings IS 'Table to store core setting details';
--
-- Name: COLUMN jala_core_settings.setting_id; Type: COMMENT; Schema: public; Owner: origami_dbadmin
--
COMMENT ON COLUMN jala_core_settings.setting_id IS 'Auto incrementing id of the table';
--
-- Name: COLUMN jala_core_settings.setting_type; Type: COMMENT; Schema: public; Owner: origami_dbadmin
--
COMMENT ON COLUMN jala_core_settings.setting_type IS 'type of settings defined in constents';
--
-- Name: COLUMN jala_core_settings.setting_data; Type: COMMENT; Schema: public; Owner: origami_dbadmin
--
COMMENT ON COLUMN jala_core_settings.setting_data IS 'data stored as text array';
--
-- Name: COLUMN jala_core_settings.setting_addedby; Type: COMMENT; Schema: public; Owner: origami_dbadmin
--
COMMENT ON COLUMN jala_core_settings.setting_addedby IS 'Id of the user who added the data';
--
-- Name: COLUMN jala_core_settings.setting_addedon; Type: COMMENT; Schema: public; Owner: origami_dbadmin
--
COMMENT ON COLUMN jala_core_settings.setting_addedon IS 'Timstamp at which the data is added';
--
-- Name: COLUMN jala_core_settings.setting_last_editby; Type: COMMENT; Schema: public; Owner: origami_dbadmin
--
COMMENT ON COLUMN jala_core_settings.setting_last_editby IS 'Id of the user who edited the data';
--
-- Name: COLUMN jala_core_settings.setting_last_editon; Type: COMMENT; Schema: public; Owner: origami_dbadmin
--
COMMENT ON COLUMN jala_core_settings.setting_last_editon IS 'Timstamp at which the data is edited';
--
-- Name: COLUMN jala_core_settings.t_created; Type: COMMENT; Schema: public; Owner: origami_dbadmin
--
COMMENT ON COLUMN jala_core_settings.t_created IS 'Time when the audit check list was created';
--
-- Name: COLUMN jala_core_settings.t_modified; Type: COMMENT; Schema: public; Owner: origami_dbadmin
--
COMMENT ON COLUMN jala_core_settings.t_modified IS 'Time when the audit check list was modified';
--
-- Name: COLUMN jala_core_settings.t_deleted; Type: COMMENT; Schema: public; Owner: origami_dbadmin
--
COMMENT ON COLUMN jala_core_settings.t_deleted IS 'Time when the audit check list was deleted';
--
-- Name: COLUMN jala_core_settings.deleted; Type: COMMENT; Schema: public; Owner: origami_dbadmin
--
COMMENT ON COLUMN jala_core_settings.deleted IS '0=not deleted,1=deleted';
--
-- Name: jala_core_settings_setting_id_seq; Type: SEQUENCE; Schema: public; Owner: origami_dbadmin
--
CREATE SEQUENCE jala_core_settings_setting_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
ALTER TABLE public.jala_core_settings_setting_id_seq OWNER TO origami_dbadmin;
-- -- Name: jala_core_settings_setting_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: origami_dbadmin --
ALTER SEQUENCE jala_core_settings_setting_id_seq OWNED BY jala_core_settings.setting_id;
--
-- Name: setting_id; Type: DEFAULT; Schema: public; Owner: origami_dbadmin
--
ALTER TABLE ONLY jala_core_settings ALTER COLUMN setting_id SET DEFAULT nextval('jala_core_settings_setting_id_seq'::regclass);
--
-- Name: jala_core_settings_pkey; Type: CONSTRAINT; Schema: public; Owner: origami_dbadmin; Tablespace:
--
ALTER TABLE ONLY jala_core_settings ADD CONSTRAINT jala_core_settings_pkey PRIMARY KEY (setting_id);
--
-- PostgreSQL database dump complete
--
</source>