--2010-11-05
-- Create table
create table JA_MEETING
(
ID NUMBER not null,
USERID INTEGER,
STARTTIME DATE,
ENDTIME DATE,
ADDRESS VARCHAR2(255),
TITLE VARCHAR2(255),
CONTENT VARCHAR2(3000)
);
-- Add comments to the columns
comment on column JA_MEETING.USERID
is '发布人id';
comment on column JA_MEETING.STARTTIME
is '开始时间';
comment on column JA_MEETING.ENDTIME
is '结束时间';
comment on column JA_MEETING.ADDRESS
is '地址';
comment on column JA_MEETING.TITLE
is '标题';
comment on column JA_MEETING.CONTENT
is '内容';
-- Create/Recreate primary, unique and foreign key constraints
alter table JA_MEETING
add constraint PK_JA_MEETING primary key (ID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table JA_MEETING
add constraint FK_JA_MEETING_JC_USER foreign key (USERID)
references JC_USER (USER_ID);
-- Create sequence
create sequence S_JA_MEETING
minvalue 1
maxvalue 999999999999999999999999999
start with 1
increment by 1
cache 20;
alter table JA_MEETING add SITE_ID INTEGER ;
alter table ja_meeting add addtime date ;
comment on column JA_MEETING.addtime
is '添加时间';
--2010-11-8
-- Add comments to the columns
comment on column JA_MEETING_USER.MEETINGID
is '会议id';
comment on column JA_MEETING_USER.USERID
is '用户id';
comment on column JA_MEETING_USER.STATUS
is '会议发布状态';
-- Create/Recreate primary, unique and foreign key constraints
alter table JA_MEETING_USER
add constraint PK_MEETING_USER primary key (ID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table JA_MEETING_USER
add constraint FK_MEETING_MEETING foreign key (MEETINGID)
references JA_MEETING (ID);
alter table JA_MEETING_USER
add constraint FK_MEETING_USER foreign key (USERID)
references JC_USER (USER_ID);
-- Create sequence
create sequence S_JA_MEETING_USER
minvalue 1
maxvalue 999999999999999999999999999
start with 1
increment by 1
cache 20;
--2010-11-15
-- Create table
create table JA_FUNCTION
(
FUNCTION_ID NUMBER(6) not null,
PARENT INTEGER,
NAME VARCHAR2(100),
URL VARCHAR2(200),
FUNCS CLOB,
DESCRIPTION VARCHAR2(250),
PRIORITY INTEGER not null,
IS_MENU INTEGER not null
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Add comments to the table
comment on table JA_FUNCTION
is '功能表';
-- Add comments to the columns
comment on column JA_FUNCTION.PARENT
is '父功能';
comment on column JA_FUNCTION.FUNCS
is '功能列表集,用@分割';
comment on column JA_FUNCTION.PRIORITY
is '功能菜单排列顺序';
comment on column JA_FUNCTION.IS_MENU
is '是否为菜单';
-- Create/Recreate primary, unique and foreign key constraints
alter table JA_FUNCTION
add constraint PK_JC_FUNCTION primary key (FUNCTION_ID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table JA_FUNCTION
add constraint FK_CORE_FUN_PARENT_CORE_FUN foreign key (PARENT)
references JA_FUNCTION (FUNCTION_ID);
-- Create table
create table JA_ROLE_FUNCTION
(
ROLE_ID INTEGER not null,
FUNCTION_ID INTEGER not null
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create/Recreate primary, unique and foreign key constraints
alter table JA_ROLE_FUNCTION
add constraint PK_JA_CORE_ROLE_FUNCTION primary key (ROLE_ID, FUNCTION_ID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table JA_ROLE_FUNCTION
add constraint FK_CORE_FUNCTION_ROLE foreign key (ROLE_ID)
references JC_ROLE (ROLE_ID);
alter table JA_ROLE_FUNCTION
add constraint FK_JA_CORE_ROLE_FUNCTION foreign key (FUNCTION_ID)
references JA_FUNCTION (FUNCTION_ID);
-- Create table
create table JA_USER_ROLE
(
ROLE_ID INTEGER not null,
USER_ID INTEGER not null
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create/Recreate primary, unique and foreign key constraints
alter table JA_USER_ROLE
add constraint PK_JA_CORE_ADMIN_ROLE primary key (ROLE_ID, USER_ID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table JA_USER_ROLE
add constraint FK_CORE_ADM_CORE_ADMI_CORE_ROL foreign key (ROLE_ID)
references JC_ROLE (ROLE_ID);
alter table JA_USER_ROLE
add constraint FK_CORE_ROLE_USER foreign key (USER_ID)
references JC_USER (USER_ID);
--2010-11-16
-- Create sequence
create sequence S_JA_FUNCTION
minvalue 1
maxvalue 999999999999999999999999999
start with 1
increment by 1
cache 20;
alter table jc_role add description varchar2(255);
comment on column JC_ROLE.description
is '描述';
--2010-11-17
-- Create table
create table JA_USER_FUNCTION
(
USER_ID INTEGER not null,
FUNCTION_ID INTEGER not null
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create/Recreate primary, unique and foreign key constraints
alter table JA_USER_FUNCTION
add constraint PK_JA_USER_FUNCTION primary key (USER_ID, FUNCTION_ID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
--2010-11-19
-- Create table
create table JA_CHANNEL_USER
(
CHANNEL_ID INTEGER not null,
USER_ID INTEGER not null
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Add comments to the table
comment on table JA_CHANNEL_USER
is 'CMS栏目审核用户关联表';
-- Create/Recreate primary, unique and foreign key constraints
alter table JA_CHANNEL_USER
add constraint PK_JA_CHANNEL_USER primary key (CHANNEL_ID, USER_ID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table JA_CHANNEL_USER
add constraint FK_JA_CHANNEL_USER foreign key (USER_ID)
references JC_USER (USER_ID);
alter table JA_CHANNEL_USER
add constraint FK_JA_USER_CHANNEL foreign key (CHANNEL_ID)
references JC_CHANNEL (CHANNEL_ID);
-- Create/Recreate indexes
create index JA_CHANNEL_USER_FK on JA_CHANNEL_USER (CHANNEL_ID)
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
create index JA_USER_CHANNEL_FK on JA_CHANNEL_USER (USER_ID)
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create table
create table JA_USER_SITE
(
USERSITE_ID INTEGER not null,
USER_ID INTEGER not null,
SITE_ID INTEGER not null,
CHECK_STEP INTEGER default 0 not null,
IS_ALL_CHANNEL INTEGER default 1 not null
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Add comments to the table
comment on table JA_USER_SITE
is 'CMS管
- 1
- 2
前往页