/*==============================================================*/ /* Database name: Database */ /* DBMS name: ORACLE Version 10g */ /* Created on: 21/02/2010 19:01:18 PM */ /*==============================================================*/ -- SQL script that update fitBank squema -- To run this script from the SQL Plus, perform the following steps: -- 1. connect to the database -- 2. set define character to ! -- "set define !" -- 3. issue the command "@ " -- where represents the name of this script spool fitbank201063014.log /*==============================================================*/ /* Table: TCUENTAINVERSIONES */ /*==============================================================*/ alter table TCUENTAINVERSIONES add ( FINICIOPAGOS DATE, CTIPOCUOTA VARCHAR2(3)); comment on column TCUENTAINVERSIONES.FINICIOPAGOS is 'Fecha de inicio de los pagos de una cuenta de inversiones'; comment on column TCUENTAINVERSIONES.CTIPOCUOTA is 'Codigo del tipo de cuota'; alter table TCUENTAINVERSIONES add constraint FKCTAINVTIPCUO foreign key (CTIPOCUOTA) references TTIPOSCUOTAID (CTIPOCUOTA); alter table TTIPOTITULOVALORCODIGOCONTABLE drop constraint FKTIPTITCODCON; alter table TTIPOTITULOVALORCODIGOCONTABLE drop primary key cascade; drop table TTIPOTITULOVALORCODIGOCONTABLE cascade constraints; /*==============================================================*/ /* Table: TTIPOTITULOVALORCODIGOCONTABLE */ /*==============================================================*/ create table TTIPOTITULOVALORCODIGOCONTABLE ( CTIPOTITULOVALOR VARCHAR2(3) not null, CODIGOCONTABLE VARCHAR2(4) not null, VERSIONCONTROL NUMBER(22) default 0 ); comment on table TTIPOTITULOVALORCODIGOCONTABLE is 'Codigo contable asociado al tipo de titulo valor'; comment on column TTIPOTITULOVALORCODIGOCONTABLE.CTIPOTITULOVALOR is 'Codigo del tipo de titulo valor'; comment on column TTIPOTITULOVALORCODIGOCONTABLE.CODIGOCONTABLE is 'Codigo contable asociado a la moneda'; comment on column TTIPOTITULOVALORCODIGOCONTABLE.VERSIONCONTROL is 'Manejo de optimistic locking.'; alter table TTIPOTITULOVALORCODIGOCONTABLE add constraint IPKTIPTITCODCON primary key (CTIPOTITULOVALOR, CODIGOCONTABLE); alter table TTIPOTITULOVALORCODIGOCONTABLE add constraint FKTIPTITCODCON foreign key (CTIPOTITULOVALOR) references TTIPOSTITULOVALORID (CTIPOTITULOVALOR); spool off