Skip to content

[stable12] Ask the schema whether the table and column exist - #6442

Merged
MorrisJobke merged 2 commits into
stable12from
backport-6416-make-sure-sqlite-works-without-content
Sep 11, 2017
Merged

MorrisJobke merged 2 commits into
stable12from
backport-6416-make-sure-sqlite-works-without-content

Conversation

@nickvergessen

Copy link
Copy Markdown
Member

Backport #6416

// This is the equivalent of the new migration code that is used in 13+
$filterExpression = '/^' . preg_quote($this->config->getSystemValue('dbtableprefix', 'oc_')) . '/';
$this->db->getConfiguration()->setFilterSchemaAssetsExpression($filterExpression);
$schema = $this->db->getSchemaManager()->createSchema();

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the code which is mocked away in 13+ with migrations, that's why 1. it was not used like this before and 2. the diff is different compared to the 13 PR

@MorrisJobke MorrisJobke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works 👍

@Ivansss Ivansss left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worked for me as well 👍

@MorrisJobke
MorrisJobke merged commit 0c43183 into stable12 Sep 11, 2017
@MorrisJobke
MorrisJobke deleted the backport-6416-make-sure-sqlite-works-without-content branch September 11, 2017 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants