This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » plugins » General plug-ins » new plugin sfPropelSqlDiffPlugin - build diff sql
Re: Small fix for code [message #48380 is a reply to message #48376 ] Mon, 24 March 2008 13:10 Go to previous messageGo to next message
yspro  is currently offline yspro
Messages: 19
Registered: March 2008
Location: Belarus::Minsk
Junior Member
You're right...

So look at:

<?php
if($tabledata['keys']) { 
          foreach(
$tabledata['keys'] as $field=>$fielddata) {
            
$mycode $fielddata['code'];
            
$otherdata = @$this->tables[$tablename]['keys'][$field];
            
$othercode = @$otherdata['code'];
        
            if(
$mycode and !$othercode) {
                  if(
$otherdata['type']=='PRIMARY') { // <-----
                    
$diff_sql .= "ALTER TABLE `$tablename` ADD PRIMARY KEY $mycode;\n";
                  } else {
                    
$diff_sql .= "ALTER TABLE `$tablename` ADD {$fielddata['type']} INDEX   `$field` $mycode;\n";
                  }
            }
          } 
      }
?>


Maybe it should be:

<?php
if($tabledata['keys']) { 
          foreach(
$tabledata['keys'] as $field=>$fielddata) {
            
$mycode $fielddata['code'];
            
$otherdata = @$this->tables[$tablename]['keys'][$field];
            
$othercode = @$otherdata['code'];
        
            if(
$mycode and !$othercode) {
                  if(
$fielddata['type']=='PRIMARY') {//if($otherdata['type']=='PRIMARY')
                    
$diff_sql .= "ALTER TABLE `$tablename` ADD PRIMARY KEY $mycode;\n";
                  } else {
                    
$diff_sql .= "ALTER TABLE `$tablename` ADD {$fielddata['type']} INDEX   `$field` $mycode;\n";
                  }
            }
          } 
      }
?>


[YS.PRO] blog
Re: Small fix for code [message #48386 is a reply to message #48380 ] Mon, 24 March 2008 14:23 Go to previous messageGo to next message
gray  is currently offline gray
Messages: 30
Registered: January 2008
Member
yspro wrote on Mon, 24 March 2008 13:10


Maybe it should be:


You're right.
I am going to release today new version with all patches and corrections.
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #48388 is a reply to message #43210 ] Mon, 24 March 2008 14:39 Go to previous messageGo to next message
yspro  is currently offline yspro
Messages: 19
Registered: March 2008
Location: Belarus::Minsk
Junior Member
I hope this release would be stable )


[YS.PRO] blog
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #48392 is a reply to message #48388 ] Mon, 24 March 2008 15:48 Go to previous messageGo to next message
gray  is currently offline gray
Messages: 30
Registered: January 2008
Member
yspro wrote on Mon, 24 March 2008 14:39

I hope this release would be stable )

Currently it has version 0.1.1. I think stable release will be at 1.0.0 Very Happy
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #48420 is a reply to message #43210 ] Mon, 24 March 2008 22:03 Go to previous messageGo to next message
gray  is currently offline gray
Messages: 30
Registered: January 2008
Member
New version has been uploaded.

Changelog:

- added task propel-update-all (thanks to naholyr)
- fixed problem with short open tags
- fixed problem with "foreign key constraint fails" error during diff.sql execution (reported by Emiliano.Gabrielli)
- primary key creation fix (by yspro)

[Updated on: Mon, 24 March 2008 22:15]

Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #48422 is a reply to message #43210 ] Mon, 24 March 2008 22:37 Go to previous messageGo to next message
gray  is currently offline gray
Messages: 30
Registered: January 2008
Member
If you have isses with upgrading plugin please try command
symfony plugin-upgrade http://plugins.symfony-project.com/sfPropelSqlDiffPlugin-0.1.2

instead of
symfony plugin-upgrade http://plugins.symfony-project.com/sfPropelSqlDiffPlugin

I have posted ticket about it http://trac.symfony-project.com/ticket/3195

[Updated on: Mon, 24 March 2008 22:50]

Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #48453 is a reply to message #48422 ] Tue, 25 March 2008 11:01 Go to previous messageGo to next message
yspro  is currently offline yspro
Messages: 19
Registered: March 2008
Location: Belarus::Minsk
Junior Member
I still have trouble with upgrading via cli:


>> plugin    upgrading plugin "http://plugin...om/sfPropelSqlDiffPlugin-0.1.2"
>> pear      Could not download from
>> pear      "http://plugins.symfony-project.com/sfPropelSqlDiffPlugin-0.1.2"
>> pear      Invalid or missing remote package file
>> pear      Package
>> pear      "http://plugins.symfony-project.com/sfPropelSqlDiffPlugin-0.1.2"
>> pear      is not valid


  [Exception]
  upgrade failed

[Updated on: Tue, 25 March 2008 11:03]


[YS.PRO] blog
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #48457 is a reply to message #43210 ] Tue, 25 March 2008 12:10 Go to previous messageGo to next message
yspro  is currently offline yspro
Messages: 19
Registered: March 2008
Location: Belarus::Minsk
Junior Member
<?php
if($tabledata['keys']) foreach($tabledata['keys'] as $field=>$fielddata) {
        
$mycode $fielddata['code'];
        
$otherdata = @$this->tables[$tablename]['keys'][$field];
        
$othercode = @$otherdata['code'];
        if(
$mycode and !$othercode) {
          if(
$fielddata['type']=='PRIMARY') {// was -->>> if($otherdata['type']=='PRIMARY') {
            
$diff_sql .= "ALTER TABLE `$tablename` ADD PRIMARY KEY $mycode;\n";
          } else {
            
$diff_sql .= "ALTER TABLE `$tablename` ADD {$fielddata['type']} INDEX  `$field` $mycode;\n";
          }
        };
      };
?>


[YS.PRO] blog
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #48462 is a reply to message #43210 ] Tue, 25 March 2008 13:37 Go to previous messageGo to next message
yspro  is currently offline yspro
Messages: 19
Registered: March 2008
Location: Belarus::Minsk
Junior Member
plugin doesn't correctly read all primary keys from db, there are in schema file built by native symfony command: propel-build-schema, but there aren't in $i object of run_propel_build_sql_diff() function...

How I got it:
<?php
//......
$i = new dbInfo();
  
$i->loadFromDb();
    
ob_start();
    
print_r($i);
    
file_put_contents('d:\db.txt'ob_get_contents());
    
ob_clean();
  
$i2 = new dbInfo();
  
$i2->loadAllFilesInDir(sfConfig::get('sf_data_dir').'/sql');
      
print_r($i2);
    
file_put_contents('d:\schema.txt'ob_get_contents());
    
ob_end_clean();
//.......
?>


[YS.PRO] blog
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #48484 is a reply to message #48462 ] Tue, 25 March 2008 17:26 Go to previous messageGo to next message
gray  is currently offline gray
Messages: 30
Registered: January 2008
Member
yspro wrote on Tue, 25 March 2008 13:37

plugin doesn't correctly read all primary keys from db, there are in schema file built by native symfony command: propel-build-schema, but there aren't in $i object of run_propel_build_sql_diff() function...



You mean that plugin reads data from schema.yml correctly, but incorrectly from mysql database?
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #48492 is a reply to message #43210 ] Tue, 25 March 2008 19:26 Go to previous messageGo to next message
yspro  is currently offline yspro
Messages: 19
Registered: March 2008
Location: Belarus::Minsk
Junior Member
Yes... I put here some fixed pieces of code tomorrow Smile


[YS.PRO] blog
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #48518 is a reply to message #43210 ] Wed, 26 March 2008 09:28 Go to previous messageGo to next message
yspro  is currently offline yspro
Messages: 19
Registered: March 2008
Location: Belarus::Minsk
Junior Member
At the beginning of getTableInfoFromCreate() function I inserted preg_replace call to avoid ')' in case of comments' existing:
$create_table = preg_replace('/comment\s*?=?\s*?([\'"]).*?\1/si', '', $create_table);

f.e.:
CREATE TABLE `contact_email` (
  `id` int(11) unsigned NOT NULL,
  `email` varchar(255) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='used for user feedback (ex. Contact Us)'


Also small fix:

<?php
//before:
preg_match("/^\s*create table `?([^\s`]+)`?\s+\((.*)\)[^\)]*$/mis"$create_table$matches); // mis flags combination is non-sense ;)

//fixed:
preg_match("/^\s*create table\s+`?([^\s`]+)`?\s+\((.*)\)[^\)]*$/is"$create_table$matches);
?>


P.S.: to be continued... Wink


[YS.PRO] blog
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #48963 is a reply to message #43210 ] Tue, 01 April 2008 19:08 Go to previous messageGo to next message
Jackovson  is currently offline Jackovson
Messages: 83
Registered: March 2007
Member
Hi,

does your plugin can manage shema.xml ?


I think not Laughing

So a workarround is to transform my xml into yml witht symfony task Very Happy

Bye
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #49006 is a reply to message #48963 ] Wed, 02 April 2008 11:30 Go to previous messageGo to next message
gray  is currently offline gray
Messages: 30
Registered: January 2008
Member
Jackovson wrote on Tue, 01 April 2008 19:08


does your plugin can manage shema.xml ?


Yes it can Razz
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #49010 is a reply to message #49006 ] Wed, 02 April 2008 11:46 Go to previous messageGo to next message
Jackovson  is currently offline Jackovson
Messages: 83
Registered: March 2007
Member
Shocked Shocked Shocked Shocked Shocked

Thats VERY cool Very Happy

I thinkl i will love your project Cool


And another question :
your plugin is symfony1-1 (beta) compliant ? Laughing

[Updated on: Wed, 02 April 2008 11:51]

Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #49212 is a reply to message #43210 ] Fri, 04 April 2008 16:44 Go to previous messageGo to next message
yspro  is currently offline yspro
Messages: 19
Registered: March 2008
Location: Belarus::Minsk
Junior Member
My advice is to visit this thread


[YS.PRO] blog
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #49457 is a reply to message #49010 ] Tue, 08 April 2008 15:41 Go to previous messageGo to next message
yspro  is currently offline yspro
Messages: 19
Registered: March 2008
Location: Belarus::Minsk
Junior Member
Jackovson wrote on Wed, 02 April 2008 12:46

Shocked Shocked Shocked Shocked Shocked

Thats VERY cool Very Happy

I thinkl i will love your project Cool


And another question :
your plugin is symfony1-1 (beta) compliant ? Laughing


See this.
Quote:

New Command Line Utility

Completely rewritten from scratch (bye, pake!)


[YS.PRO] blog
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #49555 is a reply to message #49457 ] Wed, 09 April 2008 13:52 Go to previous messageGo to next message
pritam.gudekar
Messages: 10
Registered: March 2008
Junior Member
Hi,

I have some problems while using "symfony propel-build-sql-diff frontend"

I followed some steps as:
1. B'se of no pear installation on my machine I have downloaded 'sfPropelSqlDiffPlugin-0.1.2.tgz' from ' http://plugins.symfony-project.com/sfPropelSqlDiffPlugin-0.1 .2' and had extract the .tgz file to plugins folder. (is it ok or is it the wrong process?)
2) After this I added one filed to my db structure in schema.yml file. and as per the instructions given in http://trac.symfony-project.com/wiki/sfPropelSqlDiffPlugin, I have followed the commands.
3) But on executing 'symfony propel-build-sql-diff frontend' command it has given the following problem

Error ->


propel > sql-template:
[PHP Error] Phing::include_once(propel\engine\platform\MysitePlatform.php): fail
ed to open stream: No such file or directory [line 863 of C:\wamp\www\mySite\lib
\symfony\vendor\phing\Phing.php]
[PHP Error] Phing::include_once(): Failed opening 'propel\engine\platform\Mysite
Platform.php' for inclusion (include_path='C:\wamp\www\mySite\lib\symfony\vendor
\propel-generator\classes;C:\wamp\www\mySite\config/../lib/symfony;C:\wamp\www\m
ySite;C:\wamp\www\mySite\config/../lib/symfony/vendor/propel-generator/classes;C
:\wamp\www\mySite\lib;C:\wamp\www\mySite\apps\\lib;;C:\wamp\www\mySite\config/..
/lib/symfony\vendor;.;C:\php5\pear') [line 863 of C:\wamp\www\mySite\lib\symfony
\vendor\phing\Phing.php]
Execution of target "sql-template" failed for the following reason: C:\wamp\www\
mySite\lib\symfony\vendor\propel-generator\build-propel.xml:187:1: Error importi
ng propel\engine\platform\MysitePlatform.php
[phingcall] C:\wamp\www\mySite\lib\symfony\vendor\propel-generator\build-propel.
xml:187:1: Error importing propel\engine\platform\MysitePlatform.php



After this, I am not able to go ahead....

While doing this diff.sql file is generated. But didn't get any changes into this file.

So please revert me the solution for this problem.

Thanking you,
Pritam


thanx...
...pritam
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #49562 is a reply to message #49555 ] Wed, 09 April 2008 14:28 Go to previous messageGo to next message
gray  is currently offline gray
Messages: 30
Registered: January 2008
Member
Quote:

1. B'se of no pear installation on my machine I have downloaded 'sfPropelSqlDiffPlugin-0.1.2.tgz' from ' http://plugins.symfony-project.com/sfPropelSqlDiffPlugin-0.1 .2' and had extract the .tgz file to plugins folder. (is it ok or is it the wrong process?)

It is ok.

When you run
symfony propel-build-sql-diff frontend
it, at first, runs command
symfony propel-build-sql
and this command fails in your case. Try running symfony propel-build-sql separately. If it will produce errors, it isn't related with plugin, but probably with your recent changes in schema.yml
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #49574 is a reply to message #49562 ] Wed, 09 April 2008 16:03 Go to previous messageGo to next message
pritam.gudekar
Messages: 10
Registered: March 2008
Junior Member
Hi gray,

Yes....U r right!

The same problem is giving for 'symfony propel-build-sql' command also.

From this error I am thinking this problem is giving b'se of I am using sf_sandbox and not pear while creating the project/application. According to the error... the compiler/builder does not getting the Phing::include_once(propel\engine\platform\MysitePlatform.php) file. Means there is no such directories and file propel\engine\platform\MysitePlatform.php in propel folder (may be b'se of sf_sandbox not providing such file for mysql).

The default setting for the database in sf_sandbox is given 'sqlite'. So sf_sandbox may be compatibile for sqlite db and not given all settings for mysql. So that I am getting the problem while running the command for mysql and not giving the problem (runs successfully) for sqlite (this is just I am thinking).


Now I don't know exactly what is the actual problem. Do you have any Idea?

I am trying to install Pear also but again I stuck in installation.... b'se my config'n is win-xp, wamp .....so I am facing another problem..... Embarassed


thanx...
...pritam
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #49635 is a reply to message #49574 ] Thu, 10 April 2008 11:20 Go to previous messageGo to next message
pritam.gudekar
Messages: 10
Registered: March 2008
Junior Member
Hi gray,

I found the solution..... actually it was a mistake in propel.ini file while setting the value of the propel.database parameter. By mistake I had set it to the database name instead of database type i.e. mysql.

Also I have achieved what i want i.e. changes in the database table structure without flushing data.

Thanx a million.... Very Happy


thanx...
...pritam
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #49675 is a reply to message #43210 ] Thu, 10 April 2008 18:07 Go to previous messageGo to next message
ultimus  is currently offline ultimus
Messages: 4
Registered: April 2008
Location: Russia
Junior Member
Please can you explain me how I can install plug-in manual.
I have not PEAR.
Is it possible?
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #49677 is a reply to message #49675 ] Thu, 10 April 2008 18:49 Go to previous messageGo to next message
gray  is currently offline gray
Messages: 30
Registered: January 2008
Member
yes, just download .tgz from wiki and run
symfony plugin-install pluginName.tgz
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #50478 is a reply to message #43210 ] Mon, 21 April 2008 12:48 Go to previous messageGo to next message
develop7  is currently offline develop7
Messages: 6
Registered: April 2007
Location: Belarus
Junior Member
Installation from PEAR does not works.
~/projects/someproject$ symfony plugin-install http://plugins.symfony-project.com/sfPropelSqlDiffPlugin-0.1.2
>> plugin    installing plugin "http://plugi...om/sfPropelSqlDiffPlugin-0.1.2"
>> pear      downloading sfPropelSqlDiffPlugin-0.1.2.tgz ...
>> pear      Starting to download sfPropelSqlDiffPlugin-0.1.2.tgz (5,313
>> pear      bytes)
>> pear      ..
>> pear      ...done: 5,313 bytes
>> pear      symfony/sfPropelSqlDiffPlugin requires package
>> pear      "symfony/sfPropelSqlDiffPlugin" (version >= 0.8.1, version <=
>> pear      1.1.0, excluded versions: 1.1.0), downloaded version is 0.1.2
>> pear      No valid packages found

  [Exception]     
  install failed  
                  

Apply patch from http://trac.symfony-project.com/ticket/2837

[Updated on: Mon, 21 April 2008 13:04]

Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #51644 is a reply to message #50478 ] Thu, 08 May 2008 23:51 Go to previous messageGo to next message
divergent  is currently offline divergent
Messages: 78
Registered: May 2006
Member
the plugin doesn't seem to work with multiple databases - it generates inserts for the first database for all tables in the second database (even though they already exist in the other db). Is there any way around this or something additional I should do to keep the two dbs separate?
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #52809 is a reply to message #43210 ] Tue, 27 May 2008 16:04 Go to previous messageGo to next message
jett  is currently offline jett
Messages: 3
Registered: November 2007
Junior Member
I ran into a small bug, wanted to post it here just in case...

After installing the plugin, I kept getting this error:

[SQLException]
Invalid resultset column: Create Table

I traced it to line 23 of dbInfo.php:

$create_table = $rs->getString("Create Table");

My RS object was actually returning "create table" as the column key and not "Create Table".

Changing it to this line fixes the problem:

$create_table = $rs->getString("create table");
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #54479 is a reply to message #43210 ] Fri, 20 June 2008 09:08 Go to previous messageGo to next message
cokker  is currently offline cokker
Messages: 582
Registered: January 2007
Location: Germany
Faithful Member
Hi

I just tried your plugin and I think I found a bug. I use symfony 1.0.13 and installed this plugin by hand. I extraced the package and copied the file into the dirs.

When I run "symfony -T" no task was available. After I changed the name of sfPropelSqlDiffTask.php to sfPakePropelSqlDiffTask.php the task was displayed.

Further the project-dir wasn't correct. It seems that the constand SF_ROOT_DIR (line 32) is not correctly resolved. So the execute of the task failed.

After changing the line to:
define('SF_ROOT_DIR', sfConfig::get('sf_root_dir'));

it worked.


Nevertheless great work. Thanks.

greet
Sven
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #56664 is a reply to message #43210 ] Tue, 22 July 2008 07:17 Go to previous messageGo to next message
ilyap  is currently offline ilyap
Messages: 3
Registered: July 2008
Location: Russia
Junior Member
I'm using symfony 1.0 with propel 1.3 plugin installed. Am I able to use this plugin? I think the answer is 'no', but just want to be sure Smile
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #56688 is a reply to message #56664 ] Tue, 22 July 2008 12:06 Go to previous messageGo to next message
gray  is currently offline gray
Messages: 30
Registered: January 2008
Member
Yes, it dont work with propel 1.3, but it uses propel only for executing 3 queries, so you can fix it for propel 1.3, if you really need it
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #56824 is a reply to message #56688 ] Wed, 23 July 2008 13:21 Go to previous messageGo to next message
florynth  is currently offline florynth
Messages: 185
Registered: January 2007
Location: Québec - Montréal
Senior Member
Another bug (not really a bug but still)

I just try to run it on a none modified schemas and I have this modification to make

/* old definition: varchar(255) collate utf8_unicode_ci NOT NULL
   new definition: VARCHAR(255)  NOT NULL */
ALTER TABLE `sf_guard_group` CHANGE `name` `name` VARCHAR(255)  NOT NULL;



The problem is due to collate.

I don't know if there's a way to fix this with database definition or with another way.

Is this something you are aware of ?

I didn't check your code yet but I'll probably fix it myself in the next 2 months but if you could give me a track of where to look at first it will be great.


The best way to improve your Symfony knowledge is to read the source code !
When you start a project two main issues : database and security.
Sorry for my english, my first language is french.
Working for : http://www.tribalnova.com
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #56930 is a reply to message #56824 ] Thu, 24 July 2008 12:58 Go to previous messageGo to next message
gray  is currently offline gray
Messages: 30
Registered: January 2008
Member
I am going to fix this issue in nearest time
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #56931 is a reply to message #56930 ] Thu, 24 July 2008 13:02 Go to previous messageGo to next message
florynth  is currently offline florynth
Messages: 185
Registered: January 2007
Location: Québec - Montréal
Senior Member
Thanks,

another thing I found,

If I change my database engine (let say that it was My Isam and I change it to InnoDB) It would be great to handle it ! But I know it's a weird and isolated case...

Is there a way to have a svn:external on your plugin ?

I found it much simplier to update but I didn't found it in the svn /plugins list of symfony...

Thanks again this is a really helpfull plugin

Martin


The best way to improve your Symfony knowledge is to read the source code !
When you start a project two main issues : database and security.
Sorry for my english, my first language is french.
Working for : http://www.tribalnova.com
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #56938 is a reply to message #56931 ] Thu, 24 July 2008 15:04 Go to previous messageGo to next message
gray  is currently offline gray
Messages: 30
Registered: January 2008
Member
florynth wrote on Thu, 24 July 2008 13:02

Is there a way to have a svn:external on your plugin ?


No, it isn't in symfony svn
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #57551 is a reply to message #56938 ] Fri, 01 August 2008 14:02 Go to previous messageGo to next message
krystianh  is currently offline krystianh
Messages: 4
Registered: October 2007
Junior Member
It's great plugin but today I found many bugs.

I haven't difference between my schema.xml and database and I run task symfony propel-build-sql-diff admin.
It generated diff.sql which have many lines with ADD INDEX, which there are in database yet...
f.e.
ALTER TABLE `file_data` ADD `INDEX` file_data_FI_1 (file_info_id);

Besides word INDEX have before and after char ', - it's bug.

Many times there is lines like this:
ALTER TABLE `ktr_mail` DROP `KEY`;
and
ALTER TABLE `ktr_object_changelog` CHANGE `CONSTRAINT` `CONSTRAINT` ktr_object_changelog_FK_2;
- it's bugs too.

Do you plan to repair it?
Best regards.
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #57564 is a reply to message #57551 ] Fri, 01 August 2008 14:51 Go to previous messageGo to next message
gray  is currently offline gray
Messages: 30
Registered: January 2008
Member
krystianh wrote on Fri, 01 August 2008 14:02

It's great plugin but today I found many bugs.



Which version of mysql do you using? Could you send to me output of "show create table" query for one of your tables?
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #57565 is a reply to message #57564 ] Fri, 01 August 2008 15:00 Go to previous messageGo to next message
krystianh  is currently offline krystianh
Messages: 4
Registered: October 2007
Junior Member
I use MySQL 5.0.51a-3ubuntu5.1

CREATE TABLE `ktr_config` (
`config_id` int(11) NOT NULL auto_increment,
`config_variable_name` varchar(50) NOT NULL,
`config_parameter_type_config_parameter_type_id` int(11) NOT NULL,
`config_parameter_show` int(11) NOT NULL default '1',
PRIMARY KEY (`config_id`),
UNIQUE KEY `uq_config` (`config_variable_name`),
KEY `ktr_config_FI_1` (`config_parameter_type_config_parameter_type_id`),
CONSTRAINT `ktr_config_FK_1` FOREIGN KEY (`config_parameter_type_config_parameter_type_id`) REFERENCES `ktr_config_parameter_type` (`config_parameter_type_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #58528 is a reply to message #57565 ] Tue, 12 August 2008 16:36 Go to previous messageGo to next message
krystianh  is currently offline krystianh
Messages: 4
Registered: October 2007
Junior Member
I consider this problem.
I had in propel.ini option propel.disableIdentifierQuoting set on true.
When I set this option on false is OK.
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #60177 is a reply to message #43210 ] Thu, 04 September 2008 15:39 Go to previous messageGo to next message
zecho  is currently offline zecho
Messages: 4
Registered: September 2008
Location: Bulgaria
Junior Member
When using --env="..." no matter what is the value set the result is the same:

>symfony propel:build-sql-diff --env="prod" frontend


The execution of task "propel:build-sql-diff" failed.
- Option "--env" requires an argument.
- Too many arguments ("propel:build-sql-diff prod frontend" given).


symfony propel:build-sql-diff [--env="..."] application

I tried with different values just for test but there were no success.
Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #60208 is a reply to message #60177 ] Thu, 04 September 2008 18:39 Go to previous messageGo to next message
gray  is currently offline gray
Messages: 30
Registered: January 2008
Member
zecho wrote on Thu, 04 September 2008 15:39

When using --env="..." no matter what is the value set the result is the same:



It works for me. Which OS you are using? May be --env=prod without quotes?

[Updated on: Thu, 04 September 2008 18:40]

Re: new plugin sfPropelSqlDiffPlugin - build diff sql [message #60235 is a reply to message #43210 ] Fri, 05 September 2008 09:08 Go to previous messageGo to previous message
zecho  is currently offline zecho
Messages: 4
Registered: September 2008
Location: Bulgaria
Junior Member
Sorry Smile

Just tested on lunux - it's working there
OS: Debian Lenny
symfony version 1.1.0 (/usr/share/php/symfony)

But on:
OS: Windows XP SP2
symfony version 1.1.1 (C:\xampp\php\PEAR\symfony)

On both places sfPropelSqlDiffPlugin is:
0.1.4-beta # plugins.symfony-project.org (symfony-plugins)

Regards,
Yanko Simeonoff

P.S. Tested with and without quotes. The results are the same.

[Updated on: Fri, 05 September 2008 09:09]

Previous Topic:sfDoctrineGuardUser - newbee question
Next Topic:generate doctrine admin to a plugin directory
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software