Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
d824d03f
Commit
d824d03f
authored
10 years ago
by
Thomas Müller
Browse files
Options
Downloads
Patches
Plain Diff
Disable database migrations for MSSQL - scripts have to be applied manually
parent
31898aa6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/private/db/mdb2schemamanager.php
+3
-0
3 additions, 0 deletions
lib/private/db/mdb2schemamanager.php
lib/private/db/mssqlmigrator.php
+23
-0
23 additions, 0 deletions
lib/private/db/mssqlmigrator.php
with
26 additions
and
0 deletions
lib/private/db/mdb2schemamanager.php
+
3
−
0
View file @
d824d03f
...
...
@@ -12,6 +12,7 @@ use Doctrine\DBAL\Platforms\MySqlPlatform;
use
Doctrine\DBAL\Platforms\OraclePlatform
;
use
Doctrine\DBAL\Platforms\PostgreSqlPlatform
;
use
Doctrine\DBAL\Platforms\SqlitePlatform
;
use
Doctrine\DBAL\Platforms\SQLServerPlatform
;
class
MDB2SchemaManager
{
/**
...
...
@@ -65,6 +66,8 @@ class MDB2SchemaManager {
return
new
OracleMigrator
(
$this
->
conn
);
}
else
if
(
$platform
instanceof
MySqlPlatform
)
{
return
new
MySQLMigrator
(
$this
->
conn
);
}
else
if
(
$platform
instanceof
SQLServerPlatform
)
{
return
new
MsSqlMigrator
(
$this
->
conn
);
}
else
if
(
$platform
instanceof
PostgreSqlPlatform
)
{
return
new
Migrator
(
$this
->
conn
);
}
else
{
...
...
This diff is collapsed.
Click to expand it.
lib/private/db/mssqlmigrator.php
0 → 100644
+
23
−
0
View file @
d824d03f
<?php
/**
* Copyright (c) 2014 Thomas Müller <deepdiver@owncloud.com>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
namespace
OC\DB
;
use
Doctrine\DBAL\Schema\Schema
;
class
MsSqlMigrator
extends
Migrator
{
/**
* @param \Doctrine\DBAL\Schema\Schema $targetSchema
*/
public
function
migrate
(
Schema
$targetSchema
)
{
throw
new
MigrationException
(
''
,
'Database migration is required to continue operations. Please contact support@owncloud.com to get the required sql migration scripts to be applied.'
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment