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
e2b6781c
Commit
e2b6781c
authored
11 years ago
by
Bart Visscher
Browse files
Options
Downloads
Patches
Plain Diff
Tweaks to the MDB2SchemaReader
parent
5549c77e
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
3rdparty
+1
-1
1 addition, 1 deletion
3rdparty
db_structure.xml
+1
-1
1 addition, 1 deletion
db_structure.xml
lib/db/mdb2schemareader.php
+6
-1
6 additions, 1 deletion
lib/db/mdb2schemareader.php
with
8 additions
and
3 deletions
3rdparty
@
25e8568d
Compare
c8623cc8
...
25e8568d
Subproject commit
c8623cc80d47022cb25874b69849cd2f57fd4874
Subproject commit
25e8568d41a9b9a6d1662ccf33058822a890e7f5
This diff is collapsed.
Click to expand it.
db_structure.xml
+
1
−
1
View file @
e2b6781c
...
@@ -383,7 +383,7 @@
...
@@ -383,7 +383,7 @@
<name>
user
</name>
<name>
user
</name>
<type>
text
</type>
<type>
text
</type>
<default></default>
<default></default>
<notnull>
fals
e
</notnull>
<notnull>
tru
e
</notnull>
<length>
64
</length>
<length>
64
</length>
</field>
</field>
...
...
This diff is collapsed.
Click to expand it.
lib/db/mdb2schemareader.php
+
6
−
1
View file @
e2b6781c
...
@@ -148,6 +148,8 @@ class OC_DB_MDB2SchemaReader {
...
@@ -148,6 +148,8 @@ class OC_DB_MDB2SchemaReader {
if
(
empty
(
$options
[
'notnull'
])
||
!
$options
[
'notnull'
])
{
if
(
empty
(
$options
[
'notnull'
])
||
!
$options
[
'notnull'
])
{
unset
(
$options
[
'default'
]);
unset
(
$options
[
'default'
]);
$options
[
'notnull'
]
=
false
;
$options
[
'notnull'
]
=
false
;
}
else
{
$options
[
'default'
]
=
''
;
}
}
if
(
$type
==
'integer'
)
{
if
(
$type
==
'integer'
)
{
$options
[
'default'
]
=
0
;
$options
[
'default'
]
=
0
;
...
@@ -165,9 +167,12 @@ class OC_DB_MDB2SchemaReader {
...
@@ -165,9 +167,12 @@ class OC_DB_MDB2SchemaReader {
$type
=
'bigint'
;
$type
=
'bigint'
;
}
}
}
}
$table
->
addColumn
(
$name
,
$type
,
$options
);
if
(
!
empty
(
$options
[
'autoincrement'
])
if
(
!
empty
(
$options
[
'autoincrement'
])
&&
!
empty
(
$options
[
'notnull'
]))
{
&&
!
empty
(
$options
[
'notnull'
]))
{
$options
[
'primary'
]
=
true
;
}
$table
->
addColumn
(
$name
,
$type
,
$options
);
if
(
!
empty
(
$options
[
'primary'
])
&&
$options
[
'primary'
])
{
$table
->
setPrimaryKey
(
array
(
$name
));
$table
->
setPrimaryKey
(
array
(
$name
));
}
}
}
}
...
...
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