Version 10 (modified by cedric, 14 years ago) (diff) |
---|
back to first page ..
Scripts de creation ONEMA
- source:trunk/EDAcommun/sql/implementation_pose/1-language_schema.sql
- source:trunk/EDAcommun/sql/implementation_pose/2-function.sql
- source:trunk/EDAcommun/sql/implementation_pose/3-nomenclatures.sql
- source:trunk/EDAcommun/sql/implementation_pose/4-Squelette.sql
- source:trunk/EDAcommun/sql/implementation_pose/5-obs_scientifique.sql
- source:trunk/EDAcommun/sql/implementation_pose/6-PressionImpact.sql
- source:trunk/EDAcommun/sql/implementation_pose/7-Biological_Process.sql
- source:trunk/EDAcommun/sql/implementation_pose/db_feeding.sql
- source:trunk/EDAcommun/sql/implementation_pose/db_feeding_BDMAP.sql
inserting BDMAP
I already have a dump of the BDMAP somewhere so I'm just saving it and will use it to insert data into the debile.
sauvegarde cd C:\eda\backup C:\"Program Files"\PostgreSQL\8.4\bin\pg_dump -U postgres -p 5433 --schema=bdmap BDMAP> bdmap.bdmap.sql restauration C:\"Program Files"\PostgreSQL\8.4\bin\psql -U postgres -d dbeel -p 5433 -f bdmap.bdmap.sql
DROP TABLE if exists "onema".station_onema CASCADE; CREATE TABLE "onema".station_onema ( LIKE bdmap.station, CONSTRAINT station_onema_id PRIMARY KEY (op_id), CONSTRAINT station_onema_fk_observation_place_type_id FOREIGN KEY (op_no_observationplacetype) REFERENCES "dbeel_nomenclature".observation_place_type (no_id) MATCH SIMPLE ON UPDATE CASCADE ON DELETE RESTRICT ) INHERITS ("dbeel".observation_places); -- TODO: insert trigger INSERT INTO "onema".station_onema SELECT uuid_generate_v4() as op_id, 'onema' as op_gis_systemname , 'BDMAP' as op_gis_layername, s.st_id as op_gislocation, s.st_localisation as op_placename, 10 as op_no_observationplacetype, -- Sampling station NULL as op_op_id, s.* FROM bdmap.station s ;