--
-- f_spatialcontext
--
DROP TABLE IF EXISTS f_spatialcontext;

create table f_spatialcontext (
    scid         serial not null,
    scname       varchar(255) not null,
    description  varchar(255),
    scgid        bigint null,
-- #ifdef FDO_LOCKS
    rowlockid   bigint null,
    rowlocktype  varchar(1) null,
-- #endif

   CONSTRAINT f_spatialcontext_pk PRIMARY KEY (scid)
);

COMMENT ON TABLE f_spatialcontext IS 'Definition of FDO spatial context.';

-- Insert default spatial context

insert into f_spatialcontext
(scname, description, scgid) 
values
('Default', 'Default Database Spatial Context', 1);
