Cache or Clear tables.#309
Conversation
| { | ||
| $this | ||
| ->setName('orm-cache-build') | ||
| ->setDescription('Build all metadata caches for the connection. If a table name is provided, only that table will be cached.') |
There was a problem hiding this comment.
Line exceeds 120 characters; contains 138 characters
| { | ||
| $this | ||
| ->setName('orm-cache-clear') | ||
| ->setDescription('Clear all metadata caches for the connection. If a table name is provided, only that table will be removed.') |
There was a problem hiding this comment.
Line exceeds 120 characters; contains 139 characters
Codecov Report
@@ Coverage Diff @@
## master #309 +/- ##
==========================================
- Coverage 85.97% 84.23% -1.74%
==========================================
Files 33 36 +3
Lines 1782 1852 +70
==========================================
+ Hits 1532 1560 +28
- Misses 250 292 +42
Continue to review full report at Codecov.
|
| /** | ||
| * Helper method to get the schema collection. | ||
| * | ||
| * @return false|\Cake\Database\Schema\Collection |
There was a problem hiding this comment.
The fallback value should be null for objects, not false.
There was a problem hiding this comment.
sure. I can make the change.
|
Looks like stickler is using the wrong standard for checks. The |
|
It does make sense to me to move those shells to this plugin |
|
Hey guys, Can anyone help me finish writing tests for this ? throws UPDATE : I have already modified this. So no more source is passed ;-) . Thank you. |
|
Seems like you are passing the |
|
@lorenzo source ? No. See the changes. Some how the tests are failing :-/ . |
|
@harikt ok, looks like it is failing because you are missing some |
|
|
||
| Cache::enable(); | ||
| $this->connection = ConnectionManager::get('test'); | ||
| $this->connection->cacheMetadata(true); |
There was a problem hiding this comment.
You should revert this in tearDown
| { | ||
| parent::setUp(); | ||
|
|
||
| Cache::enable(); |
There was a problem hiding this comment.
You need to disable in tearDown
|
@lorenzo other tests seems failing :( . I will investigate. |
|
@harikt they fail because of corrupted state in a previous test |
|
So there is a problem with the serialized value and the one running on containers. Do you know how we can fix that ? Also there is a permission issues I noticed for some tests to fail on localhost. Files are in If we do a I am leaving this to rest for now. Will come back when I have some more energy :) . |
|
Closing this PR. Opening a rebased one. |
Hi,
This PR contains commit from : #308 .
This is WIP for there is no tests currently.The idea is allow people to use cakephp/migrations as standalone .
Interested to know if you guys love this addition.
Thank you.