I have a running D2W app and I need to add some booleans to my User.security
Entity.
Normally I accomplish this by:
adding the boolean to my postgresql db with migrations:
ERXMigrationTable securityTable = database.existingTableNamed("security");
securityTable.newFlagBooleanColumn("canseeprojects", true);
(I am setting allowsNull to true even thought I want it to be false. )
then I update the security's new attribute to false for current security
entries, and change the table to not allowsNull:
/*
* Fix the canseeprojects boolean
*/
ERXJDBCUtilities.executeUpdate(database.adaptorChannel(), "UPDATE
security SET canseeprojects = false");
securityTable.existingColumnNamed("canseeprojects").setAllowsNull(false);
Is there an easier way, or is this just an artifact to live with?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]