Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
8a0898d3
Commit
8a0898d3
authored
Jul 30, 2007
by
romanb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Several fixes for mysql export module (incorrectly added indices)
Ticket: 408
parent
7583a8d8
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
963 additions
and
959 deletions
+963
-959
Mysql.php
lib/Doctrine/Export/Mysql.php
+634
-629
MysqlTestCase.php
tests/Export/MysqlTestCase.php
+288
-289
model.php
tests/Export/_files2/model.php
+41
-41
No files found.
lib/Doctrine/Export/Mysql.php
View file @
8a0898d3
This diff is collapsed.
Click to expand it.
tests/Export/MysqlTestCase.php
View file @
8a0898d3
This diff is collapsed.
Click to expand it.
tests/Export/_files2/model.php
View file @
8a0898d3
<?php
class
Cms_CategoryLanguages
extends
Doctrine_Record
{
public
function
setUp
()
{
$this
->
setAttribute
(
Doctrine
::
ATTR_COLL_KEY
,
'language_id'
);
$this
->
hasOne
(
'Cms_Category as category'
,
array
(
'local'
=>
'category_id'
,
'foreign'
=>
'id'
,
'onDelete'
=>
'CASCADE'
));
}
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
'name'
,
'string'
,
256
);
$this
->
hasColumn
(
'category_id'
,
'integer'
,
11
);
$this
->
hasColumn
(
'language_id'
,
'integer'
,
11
);
$this
->
option
(
'collate'
,
'utf8_unicode_ci'
);
$this
->
option
(
'charset'
,
'utf8'
);
$this
->
option
(
'type'
,
'INNODB'
);
$this
->
index
(
'index_category'
,
array
(
'fields'
=>
'category_id'
));
$this
->
index
(
'index_language'
,
array
(
'fields'
=>
'language_id'
));
}
}
class
Cms_Category
extends
Doctrine_Record
{
public
function
setUp
()
{
$this
->
ownsMany
(
'Cms_CategoryLanguages as langs'
,
array
(
'local'
=>
'id'
,
'foreign'
=>
'category_id'
));
}
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
'created'
,
'timestamp'
);
$this
->
hasColumn
(
'parent'
,
'integer'
,
11
);
$this
->
hasColumn
(
'position'
,
'integer'
,
3
);
$this
->
hasColumn
(
'active'
,
'integer'
,
11
);
$this
->
option
(
'collate'
,
'utf8_unicode_ci'
);
$this
->
option
(
'charset'
,
'utf8'
);
$this
->
option
(
'type'
,
'INNODB'
);
$this
->
index
(
'index_parent'
,
array
(
'fields'
=>
'parent'
));
}
}
<?php
class
Cms_CategoryLanguages
extends
Doctrine_Record
{
public
function
setUp
()
{
$this
->
setAttribute
(
Doctrine
::
ATTR_COLL_KEY
,
'language_id'
);
$this
->
hasOne
(
'Cms_Category as category'
,
array
(
'local'
=>
'category_id'
,
'foreign'
=>
'id'
,
'onDelete'
=>
'CASCADE'
));
}
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
'name'
,
'string'
,
256
);
$this
->
hasColumn
(
'category_id'
,
'integer'
,
11
);
$this
->
hasColumn
(
'language_id'
,
'integer'
,
11
);
$this
->
option
(
'collate'
,
'utf8_unicode_ci'
);
$this
->
option
(
'charset'
,
'utf8'
);
$this
->
option
(
'type'
,
'INNODB'
);
$this
->
index
(
'index_category'
,
array
(
'fields'
=>
array
(
'category_id'
)));
$this
->
index
(
'index_language'
,
array
(
'fields'
=>
array
(
'language_id'
)));
}
}
class
Cms_Category
extends
Doctrine_Record
{
public
function
setUp
()
{
$this
->
ownsMany
(
'Cms_CategoryLanguages as langs'
,
array
(
'local'
=>
'id'
,
'foreign'
=>
'category_id'
));
}
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
'created'
,
'timestamp'
);
$this
->
hasColumn
(
'parent'
,
'integer'
,
11
);
$this
->
hasColumn
(
'position'
,
'integer'
,
3
);
$this
->
hasColumn
(
'active'
,
'integer'
,
11
);
$this
->
option
(
'collate'
,
'utf8_unicode_ci'
);
$this
->
option
(
'charset'
,
'utf8'
);
$this
->
option
(
'type'
,
'INNODB'
);
$this
->
index
(
'index_parent'
,
array
(
'fields'
=>
array
(
'parent'
)));
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment