Hi Gareth

Thanks a lot for your help thus far...

I have tried implementing your solution, but can not seem to succeed. I am
using doctrine and have been looking at Doctrine packages. When implementing
it as they say on
http://www.doctrine-project.org/projects/orm/1.2/docs/manual/yaml-schema-files/eni.e.
package: accessdb, I receive errors like these:

Warning:
file_get_contents(C:\wamp\www\legaldelivery_gofer\lib/model/doctrine//base/BaseAuthos.class.php):
failed to open stream: No such file or directory
 in
C:\wamp\www\legaldelivery_gofer\lib\vendor\symfony\lib\plugins\sfDoctrinePlugin\lib\task\sfDoctrineBuildModelTask.class.php
on line 77

Then when I try to do it like lib.model.doctrine.accessdb, it created a
folder lib/model/doctrine/lib with class models in and
lib/model/doctrine/packages/lib/model/doctrine/accessdb with plugin classes.
Then when trying to run the application, it is as-if though the accessdb
integrated with my current master db, because when accessing a web page, it
gives the following error:
SQLSTATE[42S02]: Base table or view not found: 1146 Table
'accessdb.system_variables' doesn't existsystem_variables is a table out of
my master db. I have even tried "package: .accessdb" and "package:
accessdb." but to no avail...

I now have two yml files under config/doctrine/ one with the access db
detail called accessdb.schema.yml and master.schema.yml. schema.yml is
empty.

Any ideas why this is happening?

Thanks in advance...

Regards
CAP

On Mon, Jan 24, 2011 at 2:56 PM, Gareth McCumskey <[email protected]>wrote:

> There is a symfony command to do exactly that: symfony
> doctrine:build-schema
>
> 1. Make a back up copy of your existing schema.yml (make it schema.yml.bak
> or something)
> 2. Change databases.yml to point to your other database.
> 3. Run symfony doctrine:build-schema
> 4. Rename your new schema.yml to be database.schema.yml.
> 5. Rename your schem.yml.bak to schema.yml
> 6. Alter the two schema files as needed per the link I previously gave you.
> 7. Run symfony doctrine:build-model
>
> Tada
>
> On Mon, Jan 24, 2011 at 2:46 PM, Cornelius Parkin <
> [email protected]> wrote:
>
>> Hi, thanks a lot Gareth
>>
>> Do you know of a way to build the schema file i.e. database.schema.yml
>> from an existing database? I have a secondary database called accessdb and
>> want to run doctrine:build-schema that will populate the accessdb.schema.yml
>> file with the database structure.
>>
>> Regards
>> CAP
>>
>>
>> On Mon, Jan 24, 2011 at 12:59 PM, Gareth McCumskey 
>> <[email protected]>wrote:
>>
>>> A link I found with a little more detail:
>>>
>>>
>>> http://itscommonsensestupid.blogspot.com/2009/04/how-to-configure-multiple-databases-for.html
>>>
>>>
>>> On Mon, Jan 24, 2011 at 12:48 PM, Cornelius Parkin <
>>> [email protected]> wrote:
>>>
>>>> Hi Gareth, thanks so much... I am going to try it and let you know the
>>>> outcome :-)
>>>>
>>>> Regards
>>>> CAP
>>>>
>>>>
>>>> On Mon, Jan 24, 2011 at 12:45 PM, Gareth McCumskey <
>>>> [email protected]> wrote:
>>>>
>>>>> Yes you can.
>>>>>
>>>>> Create a second schema file and call it newschemname.schema.yml ,
>>>>> changing newschemname to whatever you want. Inside this new schema file 
>>>>> add
>>>>> the following the top:
>>>>>
>>>>> new_database_name:
>>>>>   _attributes:
>>>>>     package: lib.model.subdirectory
>>>>>
>>>>> This will store the model files for this schema in
>>>>> projectroot/lib/model/subdirectory when you run the model generator 
>>>>> "symfony
>>>>> doctrine:build-model"
>>>>>
>>>>> Have fun
>>>>>
>>>>> On Mon, Jan 24, 2011 at 11:12 AM, Cornelius Parkin <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Hi
>>>>>>
>>>>>> Anyone have any possible solutions regarding this? Have not had a
>>>>>> response yet. Is it also possible to build a seperate shema file from the
>>>>>> default schema.yml for the separate database and then build the models 
>>>>>> in a
>>>>>> different directory from that schema file?
>>>>>>
>>>>>>
>>>>>> Thanks in advance...
>>>>>>
>>>>>> Regards
>>>>>> CAP
>>>>>>
>>>>>> On Fri, Jan 21, 2011 at 1:18 PM, corneliusparkin <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>> I would like to know if it is possible to create a new database in
>>>>>>> Symfony and ask Symfony to create the models under a separate
>>>>>>> directory. Currently all models are stored under lib/model/doctrine
>>>>>>> when built, but I would like to be able to have Symfony create them
>>>>>>> under lib/model/doctrine/subfolder for logistics purposes.
>>>>>>>
>>>>>>> We are creating a sync task which will basically collect data from a
>>>>>>> legacy database "the one I am now trying to set up"  and import it
>>>>>>> into the new database but the task has many data conversion and
>>>>>>> mapping functions to perform.
>>>>>>>
>>>>>>> Thanks in advance...
>>>>>>>
>>>>>>> Regards
>>>>>>> CAP
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Warm Regards
>>>>>>
>>>>>> C.A.Parkin
>>>>>>
>>>>>> *~"When you innovate, you've got to be prepared for everyone telling
>>>>>> you you're nuts" - Larry Ellison~*
>>>>>>
>>>>>>  --
>>>>>> If you want to report a vulnerability issue on symfony, please send it
>>>>>> to security at symfony-project.com
>>>>>>
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "symfony users" group.
>>>>>> To post to this group, send email to [email protected]
>>>>>> To unsubscribe from this group, send email to
>>>>>> [email protected]<symfony-users%[email protected]>
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/group/symfony-users?hl=en
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Gareth McCumskey
>>>>> http://garethmccumskey.blogspot.com
>>>>> twitter: @garethmcc
>>>>> identi.ca: @garethmcc
>>>>>
>>>>>  --
>>>>> If you want to report a vulnerability issue on symfony, please send it
>>>>> to security at symfony-project.com
>>>>>
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "symfony users" group.
>>>>> To post to this group, send email to [email protected]
>>>>> To unsubscribe from this group, send email to
>>>>> [email protected]<symfony-users%[email protected]>
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/symfony-users?hl=en
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Warm Regards
>>>>
>>>> C.A.Parkin
>>>>
>>>> *~"When you innovate, you've got to be prepared for everyone telling
>>>> you you're nuts" - Larry Ellison~*
>>>>
>>>> --
>>>> If you want to report a vulnerability issue on symfony, please send it
>>>> to security at symfony-project.com
>>>>
>>>> You received this message because you are subscribed to the Google
>>>> Groups "symfony users" group.
>>>> To post to this group, send email to [email protected]
>>>> To unsubscribe from this group, send email to
>>>> [email protected]<symfony-users%[email protected]>
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/symfony-users?hl=en
>>>>
>>>
>>>
>>>
>>> --
>>> Gareth McCumskey
>>> http://garethmccumskey.blogspot.com
>>> twitter: @garethmcc
>>> identi.ca: @garethmcc
>>>
>>>  --
>>> If you want to report a vulnerability issue on symfony, please send it to
>>> security at symfony-project.com
>>>
>>> You received this message because you are subscribed to the Google
>>> Groups "symfony users" group.
>>> To post to this group, send email to [email protected]
>>> To unsubscribe from this group, send email to
>>> [email protected]<symfony-users%[email protected]>
>>> For more options, visit this group at
>>> http://groups.google.com/group/symfony-users?hl=en
>>>
>>
>>
>>
>> --
>> Warm Regards
>>
>> C.A.Parkin
>>
>> *~"When you innovate, you've got to be prepared for everyone telling you
>> you're nuts" - Larry Ellison~*
>>
>> --
>> If you want to report a vulnerability issue on symfony, please send it to
>> security at symfony-project.com
>>
>> You received this message because you are subscribed to the Google
>> Groups "symfony users" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]<symfony-users%[email protected]>
>> For more options, visit this group at
>> http://groups.google.com/group/symfony-users?hl=en
>>
>
>
>
> --
> Gareth McCumskey
> http://garethmccumskey.blogspot.com
> twitter: @garethmcc
> identi.ca: @garethmcc
>
>  --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<symfony-users%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>



-- 
Warm Regards

C.A.Parkin

*~"When you innovate, you've got to be prepared for everyone telling you
you're nuts" - Larry Ellison~*

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to