For chv_images, have the dumped database query batch out

ashkir

Core license
Internals
Beta tester
License owner
Big Chevereto
đź’ˇDescribe your Feature request

For the chv_images table when the upgraded dumps a SQL Script for large databases, it'd be handy/easier if chv_images is broken out in batch steps.

For example:
Code:
ALTER TABLE `chv_images` ADD `image_is_360` tinyint(1) NOT NULL DEFAULT '0';

to
Code:
ALTER TABLE `chv_images` ADD `image_is_360` tinyint(1) NOT NULL
ALTER TABLE `chv_images` MODIFY `image_is_360` DEFAULT '0';

đź‘ŹWhere did you saw this?

n/a

🔥Interest outside our community

n/a
 

Rodolfo

Don Chevere
Chevereto Staff
Administrator
License owner
I won't mind about this as V4 is going to use migrations, in fact, you won't even need to "manually run these queries" anymore. In any case, this a neat improvement over the default behavior and it only requires an extra ;
 

ashkir

Core license
Internals
Beta tester
License owner
Big Chevereto
I won't mind about this as V4 is going to use migrations, in fact, you won't even need to "manually run these queries" anymore. In any case, this a neat improvement over the default behavior and it only requires an extra ;
This pleases me greatly! Thank you!
 

mkerala2

Network license
Internals
Beta tester
License owner
Big Chevereto
Doesn't splitting the query make it longer to complete the overall job? Like it has to do two passes to scan and update all rows which currently does in single pass.
 

ashkir

Core license
Internals
Beta tester
License owner
Big Chevereto
Doesn't splitting the query make it longer to complete the overall job? Like it has to do two passes to scan and update all rows which currently does in single pass.
It does take longer, but, it is quicker per action for my database infrastructure.
 

Rodolfo

Don Chevere
Chevereto Staff
Administrator
License owner
Is more granular as if an statement fails, it won't be hard for you to proceed. If the thing is all in one line you have to edit the query and I understand that such thing could be hard to handle in some cases, especially if is something you don't handle eveyday
 

mkerala2

Network license
Internals
Beta tester
License owner
Big Chevereto
The problem will be for sites with very large image table. It can sometimes take hours to complete a single alter table operation on the image table. Multiple alter table operation would mean hours of down time.
 

Rodolfo

Don Chevere
Chevereto Staff
Administrator
License owner
The problem will be for sites with very large image table. It can sometimes take hours to complete a single alter table operation on the image table. Multiple alter table operation would mean hours of down time.
Yes, confirmed here:
Updates and writes to the table started after the ALTER TABLE operation begins are stalled until the new table is ready, then are automatically redirected to the new table. The temporary copy of the table is created in the database directory of the original table unless it is a RENAME TO operation that moves the table to a database that resides in a different directory.

No way I'm going to add this.
 
Top