Project

General

Profile

« Previous | Next » 

Revision 11624

bugfix: lib/runscripts/file.pg.sql.run: export_(): exclude Source and related tables so that these will be re-created by the staging tables installation instead, ensuring that they are always in sync with the Source/ subdir

View differences:

inputs/.TNRS/schema.sql
254 254

  
255 255

  
256 256
--
257
-- Name: Source; Type: TABLE; Schema: TNRS; Owner: -; Tablespace: 
258
--
259

  
260
CREATE TABLE "Source" (
261
    "*row_num" integer NOT NULL,
262
    "sourceType" text DEFAULT 'aggregator'::text NOT NULL,
263
    "datasetURL" text DEFAULT 'http://tnrs.iplantcollaborative.org/TNRSapp.html'::text NOT NULL
264
);
265

  
266

  
267
--
268
-- Name: COLUMN "Source"."sourceType"; Type: COMMENT; Schema: TNRS; Owner: -
269
--
270

  
271
COMMENT ON COLUMN "Source"."sourceType" IS 'constant';
272

  
273

  
274
--
275
-- Name: COLUMN "Source"."datasetURL"; Type: COMMENT; Schema: TNRS; Owner: -
276
--
277

  
278
COMMENT ON COLUMN "Source"."datasetURL" IS 'constant';
279

  
280

  
281
--
282 257
-- Name: batch; Type: TABLE; Schema: TNRS; Owner: -; Tablespace: 
283 258
--
284 259

  
......
360 335

  
361 336

  
362 337
--
363
-- Name: ~Source.map; Type: TABLE; Schema: TNRS; Owner: -; Tablespace: 
364
--
365

  
366
CREATE TABLE "~Source.map" (
367
    "from" text NOT NULL,
368
    "to" text,
369
    filter text,
370
    notes text
371
);
372

  
373

  
374
--
375
-- Name: Source_pkey; Type: CONSTRAINT; Schema: TNRS; Owner: -; Tablespace: 
376
--
377

  
378
ALTER TABLE ONLY "Source"
379
    ADD CONSTRAINT "Source_pkey" PRIMARY KEY ("*row_num");
380

  
381

  
382
--
383 338
-- Name: batch_download_settings_pkey; Type: CONSTRAINT; Schema: TNRS; Owner: -; Tablespace: 
384 339
--
385 340

  
......
428 383

  
429 384

  
430 385
--
431
-- Name: ~Source.map_from_key; Type: CONSTRAINT; Schema: TNRS; Owner: -; Tablespace: 
432
--
433

  
434
ALTER TABLE ONLY "~Source.map"
435
    ADD CONSTRAINT "~Source.map_from_key" UNIQUE ("from");
436

  
437

  
438
--
439
-- Name: ~Source.map_to_key; Type: CONSTRAINT; Schema: TNRS; Owner: -; Tablespace: 
440
--
441

  
442
ALTER TABLE ONLY "~Source.map"
443
    ADD CONSTRAINT "~Source.map_to_key" UNIQUE ("to");
444

  
445

  
446
--
447 386
-- Name: batch_client_version_idx; Type: INDEX; Schema: TNRS; Owner: -; Tablespace: 
448 387
--
449 388

  
......
465 404

  
466 405

  
467 406
--
468
-- Name: map_filter_insert; Type: TRIGGER; Schema: TNRS; Owner: -
469
--
470

  
471
CREATE TRIGGER map_filter_insert BEFORE INSERT ON "~Source.map" FOR EACH ROW EXECUTE PROCEDURE util.map_filter_insert();
472

  
473
ALTER TABLE "~Source.map" DISABLE TRIGGER map_filter_insert;
474

  
475

  
476
--
477 407
-- Name: tnrs_populate_fields; Type: TRIGGER; Schema: TNRS; Owner: -
478 408
--
479 409

  
lib/runscripts/file.pg.sql.run
9 9
export_() # usage: rm=1 .../file.run export_
10 10
{
11 11
	echo_func; set_make_vars; deferred_check_target_exists
12
	create_schema= to_top_file pg_dump_local
12
	create_schema= to_top_file pg_dump_local --exclude-table='*.*\y"Source"\y*'
13 13
}
14 14

  
15 15
fi

Also available in: Unified diff