0

How can I transfer the build folder to another site?

The problem is that the name of the database table prefix is sewn into the files and if I have a lot of sites I will have to manually change the data. Is it possible to automatically change the table names and prefixes?

For example:

abstract class BaseCategoriesPeer {

/** the default database name for this class */
const DATABASE_NAME = 'test';

/** the table name for this class */
const TABLE_NAME = 'test_123_categories';

For each new site I will have to change the data?

WendiKidd
  • 4,333
  • 4
  • 33
  • 50
Shniperson
  • 549
  • 4
  • 9

1 Answers1

0

If I got it correctly, here's a possible solution:

You can check the directory in which your source file is, and make a switch to define a variable (let's say) $appStored.

Then in a class for database access definitions (it's more common than a table name schema that depends on the deploy site), you make another switch, this time switch ($appStored), and then define the names for each deploy configuration.

Niloct
  • 9,491
  • 3
  • 44
  • 57
  • Thanks! sorry my english ;) I'm doing a module and it can work on many sites, I will be hard to change every time the configuration file – Shniperson Aug 06 '12 at 06:19
  • You're welcome! So you still have questions ? What did you think about my suggestion ? – Niloct Aug 06 '12 at 14:18