Re: Migrations cake v.1.3 -> v.3.x

2015-06-05 Thread euromark
Basically

$sql = $this->schema()->truncateSql($this->_connection);
foreach ($sql as $snippet) {
$this->_connection->execute($snippet);
}


Am Freitag, 5. Juni 2015 12:15:01 UTC+2 schrieb euromark:
>
> This is all you need in your Table:
>
> https://github.com/dereuromark/cakephp-tools/blob/cake3/src/Model/Table/Table.php#L132
>
>
> Am Freitag, 5. Juni 2015 09:16:44 UTC+2 schrieb InYan:
>>
>>
>> 
>> Please suggest if there is an analogue of cakephp3
>>  --
>> Continuing this question, please tell how to cakephp3 implement such a 
>> code: $this->Model->query("TRUNCATE TABLE models;")
>> I found such a code, but how to use it - do not know 
>> http://api.cakephp.org/3.0/source-class-Cake.Database.Schema.BaseSchema.html#_truncateTableSql
>>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Migrations cake v.1.3 -> v.3.x

2015-06-05 Thread euromark
This is all you need in your Table:
https://github.com/dereuromark/cakephp-tools/blob/cake3/src/Model/Table/Table.php#L132


Am Freitag, 5. Juni 2015 09:16:44 UTC+2 schrieb InYan:
>
>
> 
> Please suggest if there is an analogue of cakephp3
>  --
> Continuing this question, please tell how to cakephp3 implement such a 
> code: $this->Model->query("TRUNCATE TABLE models;")
> I found such a code, but how to use it - do not know 
> http://api.cakephp.org/3.0/source-class-Cake.Database.Schema.BaseSchema.html#_truncateTableSql
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Migrations cake v.1.3 -> v.3.x

2015-06-05 Thread InYan



Please suggest if there is an analogue of cakephp3
 --
Continuing this question, please tell how to cakephp3 implement such a 
code: $this->Model->query("TRUNCATE TABLE models;")
I found such a code, but how to use it - do not know 
http://api.cakephp.org/3.0/source-class-Cake.Database.Schema.BaseSchema.html#_truncateTableSql

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.