External storage tables are now created in a migration#26923
Conversation
left is 9.1, right is this branch: 441,442c464,465
< `applicable_id` bigint(20) NOT NULL AUTO_INCREMENT,
< `mount_id` bigint(20) NOT NULL,
---
> `applicable_id` int(11) NOT NULL AUTO_INCREMENT,
> `mount_id` int(11) NOT NULL,
444c467
< `value` varchar(64) COLLATE utf8_bin DEFAULT NULL,
---
> `value` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
449c472
< ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
---
> ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
|
Added explicit collation and explicit bigint(20) values. I think I shouldn't need to explicitly specify the collation, see #26925 Also I'm a bit surprised that the original schema had 256 chars for "mountpoint" specified, but the resulting schema in Mysql only had 128 chars defined. That's why I also set it to 128 here in the migration... Basically all I tried to do is to prevent any differences between the 9.1 schema and the current one by diffing the schema dumps. @DeepDiver1975 @butonic please review |
Looks like I messed up some indices: |
|
Either Oracle had a hiccup or the migrations stuff doesn't work properly with Oracle: |
3dbab44 to
294cca5
Compare
|
Rebased + squashed. Let's hope the Oracle tests work now. |
| * @param Schema $schema | ||
| */ | ||
| public function up(Schema $schema) { | ||
| $prefix = $this->connection->getPrefix(); |
There was a problem hiding this comment.
@PVince81 $this->connection is an instance of \Doctrine\DBAL\Connection and has no method getPrefix
There was a problem hiding this comment.
No, it's the ownCloud connection. Else this PR would not work at all at setup time. Try it 😉
There was a problem hiding this comment.
@PVince81 I was kicked in the a** by @DeepDiver1975 several times for exactly that kind of magic
There was a problem hiding this comment.
I'm very aware of this - thanks for fighting me with my own weapons 🔪 .... maybe we need to come up with our own AbstractMigration class to allow proper handling of things like this .... let's keep this out of this pr for now.
|
👍 for @DeepDiver1975's fix |
|
@DeepDiver1975 @VicDeo is my commit acceptable then and can we merge it ? |
|
@DeepDiver1975 looked into the Oracle problem last week and said we'll need our own wrapper classes to Oraclify whatever input is coming in, like for example backtick-escaping stuff. |
|
Superseded by #27041 |
|
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. |
Description
Reimplement the old files_external DB structure as a Doctrine migration.
Related Issue
Fixes #26907
Motivation and Context
Because starting with 10.0 db_structure.xml is not used any more on updates and we need those tables.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
TODOs: