Skip to content

Move 64bit mtime migration from dav to core#29120

Merged
DeepDiver1975 merged 1 commit intomasterfrom
move-64bit-mtime-migration
Sep 28, 2017
Merged

Move 64bit mtime migration from dav to core#29120
DeepDiver1975 merged 1 commit intomasterfrom
move-64bit-mtime-migration

Conversation

@phil-davis
Copy link
Contributor

Description

Remove the migration from dav and put it in core.

Related Issue

#23228
and PR #28067

Motivation and Context

The migration was originally put in app/dav but it is for a core table.
So far the change only got to stable10 after 10.0.3 and has not been released - so it can be changed here easily.

How Has This Been Tested?

None yet.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@phil-davis phil-davis added this to the 10.1 milestone Sep 28, 2017
@phil-davis phil-davis self-assigned this Sep 28, 2017
@phil-davis phil-davis mentioned this pull request Sep 28, 2017
9 tasks
@tomneedham
Copy link
Contributor

looks good to me 👍

@phil-davis
Copy link
Contributor Author

Backport stable10 #29121

@phil-davis phil-davis modified the milestones: 10.1, development Sep 28, 2017
@DeepDiver1975 DeepDiver1975 merged commit 1fa65a2 into master Sep 28, 2017
@DeepDiver1975 DeepDiver1975 deleted the move-64bit-mtime-migration branch September 28, 2017 14:22
@phil-davis
Copy link
Contributor Author

phil-davis commented Dec 4, 2017

Check this migration still works after it has been moved:

  1. Install a new 10.0.1 system with mySQL database and check that mtime and storage_mtime fields of oc_filecache are ordinary int(11)
mysql> describe oc_filecache;
+------------------+---------------+------+-----+---------+----------------+
| Field            | Type          | Null | Key | Default | Extra          |
+------------------+---------------+------+-----+---------+----------------+
| fileid           | int(11)       | NO   | PRI | NULL    | auto_increment |
| storage          | int(11)       | NO   | MUL | 0       |                |
| path             | varchar(4000) | YES  |     | NULL    |                |
| path_hash        | varchar(32)   | NO   |     |         |                |
| parent           | int(11)       | NO   | MUL | 0       |                |
| name             | varchar(250)  | YES  |     | NULL    |                |
| mimetype         | int(11)       | NO   |     | 0       |                |
| mimepart         | int(11)       | NO   |     | 0       |                |
| size             | bigint(20)    | NO   |     | 0       |                |
| mtime            | int(11)       | NO   |     | 0       |                |
| storage_mtime    | int(11)       | NO   |     | 0       |                |
| encrypted        | int(11)       | NO   |     | 0       |                |
| unencrypted_size | bigint(20)    | NO   |     | 0       |                |
| etag             | varchar(40)   | YES  |     | NULL    |                |
| permissions      | int(11)       | YES  |     | 0       |                |
| checksum         | varchar(255)  | YES  |     | NULL    |                |
+------------------+---------------+------+-----+---------+----------------+
16 rows in set (0.00 sec)
  1. checkout a current branch with this code (e.g. v10.0.4RC1) and do the upgrade.
  2. Confirm that mtime and storage_mtime fields of oc_filecache are now bigint(20)
mysql> describe oc_filecache;
+------------------+---------------+------+-----+---------+----------------+
| Field            | Type          | Null | Key | Default | Extra          |
+------------------+---------------+------+-----+---------+----------------+
| fileid           | bigint(20)    | NO   | PRI | NULL    | auto_increment |
| storage          | int(11)       | NO   | MUL | 0       |                |
| path             | varchar(4000) | YES  |     | NULL    |                |
| path_hash        | varchar(32)   | NO   |     |         |                |
| parent           | bigint(20)    | NO   | MUL | 0       |                |
| name             | varchar(250)  | YES  |     | NULL    |                |
| mimetype         | int(11)       | NO   |     | 0       |                |
| mimepart         | int(11)       | NO   |     | 0       |                |
| size             | bigint(20)    | NO   |     | 0       |                |
| mtime            | bigint(20)    | NO   |     | 0       |                |
| storage_mtime    | bigint(20)    | NO   |     | 0       |                |
| encrypted        | int(11)       | NO   |     | 0       |                |
| unencrypted_size | bigint(20)    | NO   |     | 0       |                |
| etag             | varchar(40)   | YES  |     | NULL    |                |
| permissions      | int(11)       | YES  |     | 0       |                |
| checksum         | varchar(255)  | YES  |     | NULL    |                |
+------------------+---------------+------+-----+---------+----------------+
16 rows in set (0.00 sec)
  1. Run the PHPunit tests apps/dav/tests/unit/Connector/Sabre/FileTest.php and confirm that they pass.
Runtime:       PHP 5.6.32-1+ubuntu16.04.1+deb.sury.org+1 with Xdebug 2.5.5
Configuration: /home/phil/core/tests/phpunit-autotest.xml

................................................................. 65 / 80 ( 81%)
...............                                                   80 / 80 (100%)

Time: 55.93 seconds, Memory: 70.25MB

OK (80 tests, 243 assertions)

All good.

@lock
Copy link

lock bot commented Aug 1, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants