Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Diel
Stud.IP
Commits
cc13fcc3
Commit
cc13fcc3
authored
3 years ago
by
Elmar Ludwig
Browse files
Options
Downloads
Patches
Plain Diff
always validate schema version
parent
eddc1706
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/controllers/web_migrate.php
+0
-2
0 additions, 2 deletions
app/controllers/web_migrate.php
cli/migrate.php
+0
-2
0 additions, 2 deletions
cli/migrate.php
lib/migrations/DBSchemaVersion.php
+2
-1
2 additions, 1 deletion
lib/migrations/DBSchemaVersion.php
with
2 additions
and
5 deletions
app/controllers/web_migrate.php
+
0
−
2
View file @
cc13fcc3
...
...
@@ -17,8 +17,6 @@ class WebMigrateController extends StudipController
parent
::
before_filter
(
$action
,
$args
);
DBSchemaVersion
::
validateSchemaVersion
();
$this
->
target
=
Request
::
int
(
'target'
);
$this
->
branch
=
Request
::
get
(
'branch'
,
'0'
);
$this
->
version
=
new
DBSchemaVersion
(
'studip'
,
$this
->
branch
);
...
...
This diff is collapsed.
Click to expand it.
cli/migrate.php
+
0
−
2
View file @
cc13fcc3
...
...
@@ -53,8 +53,6 @@ if (isset($_SERVER['argv'])) {
}
}
DBSchemaVersion
::
validateSchemaVersion
();
$version
=
new
DBSchemaVersion
(
$domain
,
$branch
);
$migrator
=
new
Migrator
(
$path
,
$version
,
$verbose
);
...
...
This diff is collapsed.
Click to expand it.
lib/migrations/DBSchemaVersion.php
+
2
−
1
View file @
cc13fcc3
...
...
@@ -45,6 +45,7 @@ class DBSchemaVersion implements SchemaVersion
$this
->
domain
=
$domain
;
$this
->
branch
=
$branch
;
$this
->
versions
=
[
0
];
$this
->
validateSchemaVersion
();
$this
->
initSchemaInfo
();
}
...
...
@@ -158,7 +159,7 @@ class DBSchemaVersion implements SchemaVersion
/**
* Validate correct structure of schema_version table.
*/
p
ublic
static
function
validateSchemaVersion
()
p
rivate
function
validateSchemaVersion
()
{
$db
=
DBManager
::
get
();
$result
=
$db
->
query
(
"SHOW TABLES LIKE 'schema_versions'"
);
...
...
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