Re: copy from stdin; in migrations
Re: copy from stdin; in migrations
- Subject: Re: copy from stdin; in migrations
- From: Mark Wardle <email@hidden>
- Date: Sun, 15 Nov 2009 20:16:07 +0000
Sorry, this should be on the Project-Wonder list....
---------- Forwarded message ----------
From: Mark Wardle <email@hidden>
Date: 2009/11/15
Subject: copy from stdin; in migrations
To: WebObjects-Dev List <email@hidden>
Hi all,
Just spent time tidying up my project initialisation ready for production use.
I am using migrations and running
ERXJDBCUtilities.executeUpdateScriptFromResourceNamed(database.adaptorChannel(),
"initial-data-" +
ERXJDBCUtilities.databaseProductName(database.adaptorChannel()) +
".sql", "RSBusinessLogic");
as part of a second migration for one of my frameworks.
[The first migration is currently always a copy+paste from Entity Modeler]
I can use INSERT with no difficulties, but I thought I'd tidy things
up (*) and judiciously change to
COPY t_role (name, can_login, etc.... ) FROM stdin;
System, true
Power user, false
Flibble, true
\.
This runs if I execute psql -f xxx.sql dbname, and runs if I cut+paste.
It doesn't run when part of a migration [it just hangs]. Am I being
stupid or is this behaviour expected? I'm expecting both the former
and the latter to be correct on this occasion....
Many thanks,
Mark
(*) always a mistake to try to tidy things up at this stage...
--
Dr. Mark Wardle
Specialist registrar, Neurology
Cardiff, UK
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden