db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Bobko" <r...@ostrich-emulators.com>
Subject Re: Frustration: lack of alter table functionality
Date Fri, 08 Dec 2006 20:01:49 GMT


> 
> 
> Been there done that...  this is what I do now to make making changes  
> easy.
> 
> 
> 1.  Define tables the normal way but don't include any constraint  
> definitions in the table definition.
> 2.  Define all constraints(foreign keys etc.) as separate alter table  
> commands. with easy to use constraint names.
> 
> create table WalletDetail
>     (ID              int              NOT NULL,
>      UserName        varchar(32)      DEFAULT USER NOT NULL,
>      Detail          long varchar      ,
>      TStamp          timestamp        DEFAULT CURRENT_TIMESTAMP  NOT  
> NULL,
>      PRIMARY KEY (ID)
> );
> alter table WalletDetail add CONSTRAINT WalletDetailFK01 FOREIGN KEY  
> (ID)
> REFERENCES WalletStructure(ID);

Doesn't svnlook do this for you as well? At least, it'll provide the
text for you so you can split it up easier. After all, he's already got
a db he needs to work with.

[SNIP]


Mime
View raw message