@@ -20,89 +20,89 @@ discard block |
||
| 20 | 20 | $context = \TestHelper::getContext(); |
| 21 | 21 | $this->editor = $context->getEditor(); |
| 22 | 22 | |
| 23 | - $manager = \Aimeos\MShop\Customer\Manager\Factory::createManager( $context, 'FosUser' ); |
|
| 24 | - $this->object = $manager->getSubManager( 'property', 'FosUser' ); |
|
| 23 | + $manager = \Aimeos\MShop\Customer\Manager\Factory::createManager($context, 'FosUser'); |
|
| 24 | + $this->object = $manager->getSubManager('property', 'FosUser'); |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | |
| 28 | 28 | protected function tearDown() |
| 29 | 29 | { |
| 30 | - unset( $this->object ); |
|
| 30 | + unset($this->object); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | |
| 34 | 34 | public function testCleanup() |
| 35 | 35 | { |
| 36 | - $this->object->cleanup( array( -1 ) ); |
|
| 36 | + $this->object->cleanup(array( -1 )); |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | |
| 40 | 40 | public function testCreateItem() |
| 41 | 41 | { |
| 42 | 42 | $item = $this->object->createItem(); |
| 43 | - $this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Item\\Property\\Iface', $item ); |
|
| 43 | + $this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Item\\Property\\Iface', $item); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | |
| 47 | 47 | public function testSaveInvalid() |
| 48 | 48 | { |
| 49 | - $this->setExpectedException( \Aimeos\MW\Common\Exception::class ); |
|
| 50 | - $this->object->saveItem( new \Aimeos\MShop\Locale\Item\Standard() ); |
|
| 49 | + $this->setExpectedException(\Aimeos\MW\Common\Exception::class); |
|
| 50 | + $this->object->saveItem(new \Aimeos\MShop\Locale\Item\Standard()); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | |
| 54 | 54 | public function testSaveUpdateDeleteItem() |
| 55 | 55 | { |
| 56 | 56 | $search = $this->object->createSearch(); |
| 57 | - $search->setConditions( $search->compare( '==', 'customer.property.editor', $this->editor ) ); |
|
| 58 | - $results = $this->object->searchItems( $search ); |
|
| 57 | + $search->setConditions($search->compare('==', 'customer.property.editor', $this->editor)); |
|
| 58 | + $results = $this->object->searchItems($search); |
|
| 59 | 59 | |
| 60 | - if( ( $item = reset($results) ) === false ) { |
|
| 61 | - throw new \RuntimeException( 'No property item found' ); |
|
| 60 | + if (($item = reset($results)) === false) { |
|
| 61 | + throw new \RuntimeException('No property item found'); |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | $item->setId(null); |
| 65 | - $item->setLanguageId( 'en' ); |
|
| 66 | - $resultSaved = $this->object->saveItem( $item ); |
|
| 67 | - $itemSaved = $this->object->getItem( $item->getId() ); |
|
| 65 | + $item->setLanguageId('en'); |
|
| 66 | + $resultSaved = $this->object->saveItem($item); |
|
| 67 | + $itemSaved = $this->object->getItem($item->getId()); |
|
| 68 | 68 | |
| 69 | 69 | $itemExp = clone $itemSaved; |
| 70 | - $itemExp->setValue( 'unittest' ); |
|
| 71 | - $resultUpd = $this->object->saveItem( $itemExp ); |
|
| 72 | - $itemUpd = $this->object->getItem( $itemExp->getId() ); |
|
| 70 | + $itemExp->setValue('unittest'); |
|
| 71 | + $resultUpd = $this->object->saveItem($itemExp); |
|
| 72 | + $itemUpd = $this->object->getItem($itemExp->getId()); |
|
| 73 | 73 | |
| 74 | - $this->object->deleteItem( $itemSaved->getId() ); |
|
| 74 | + $this->object->deleteItem($itemSaved->getId()); |
|
| 75 | 75 | |
| 76 | 76 | $context = \TestHelper::getContext(); |
| 77 | 77 | |
| 78 | - $this->assertTrue( $item->getId() !== null ); |
|
| 79 | - $this->assertEquals( $item->getId(), $itemSaved->getId() ); |
|
| 80 | - $this->assertEquals( $item->getParentId(), $itemSaved->getParentId() ); |
|
| 81 | - $this->assertEquals( $item->getSiteId(), $itemSaved->getSiteId() ); |
|
| 82 | - $this->assertEquals( $item->getType(), $itemSaved->getType() ); |
|
| 83 | - $this->assertEquals( $item->getLanguageId(), $itemSaved->getLanguageId() ); |
|
| 84 | - $this->assertEquals( $item->getValue(), $itemSaved->getValue() ); |
|
| 85 | - |
|
| 86 | - $this->assertEquals( $context->getEditor(), $itemSaved->getEditor() ); |
|
| 87 | - $this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeCreated() ); |
|
| 88 | - $this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeModified() ); |
|
| 89 | - |
|
| 90 | - $this->assertEquals( $itemExp->getId(), $itemUpd->getId() ); |
|
| 91 | - $this->assertEquals( $itemExp->getParentId(), $itemUpd->getParentId() ); |
|
| 92 | - $this->assertEquals( $itemExp->getSiteId(), $itemUpd->getSiteId() ); |
|
| 93 | - $this->assertEquals( $itemExp->getType(), $itemUpd->getType() ); |
|
| 94 | - $this->assertEquals( $itemExp->getLanguageId(), $itemUpd->getLanguageId() ); |
|
| 95 | - $this->assertEquals( $itemExp->getValue(), $itemUpd->getValue() ); |
|
| 96 | - |
|
| 97 | - $this->assertEquals( $context->getEditor(), $itemUpd->getEditor() ); |
|
| 98 | - $this->assertEquals( $itemExp->getTimeCreated(), $itemUpd->getTimeCreated() ); |
|
| 99 | - $this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemUpd->getTimeModified() ); |
|
| 100 | - |
|
| 101 | - $this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultSaved ); |
|
| 102 | - $this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultUpd ); |
|
| 103 | - |
|
| 104 | - $this->setExpectedException( '\\Aimeos\\MShop\\Exception' ); |
|
| 105 | - $this->object->getItem( $itemSaved->getId() ); |
|
| 78 | + $this->assertTrue($item->getId() !== null); |
|
| 79 | + $this->assertEquals($item->getId(), $itemSaved->getId()); |
|
| 80 | + $this->assertEquals($item->getParentId(), $itemSaved->getParentId()); |
|
| 81 | + $this->assertEquals($item->getSiteId(), $itemSaved->getSiteId()); |
|
| 82 | + $this->assertEquals($item->getType(), $itemSaved->getType()); |
|
| 83 | + $this->assertEquals($item->getLanguageId(), $itemSaved->getLanguageId()); |
|
| 84 | + $this->assertEquals($item->getValue(), $itemSaved->getValue()); |
|
| 85 | + |
|
| 86 | + $this->assertEquals($context->getEditor(), $itemSaved->getEditor()); |
|
| 87 | + $this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeCreated()); |
|
| 88 | + $this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeModified()); |
|
| 89 | + |
|
| 90 | + $this->assertEquals($itemExp->getId(), $itemUpd->getId()); |
|
| 91 | + $this->assertEquals($itemExp->getParentId(), $itemUpd->getParentId()); |
|
| 92 | + $this->assertEquals($itemExp->getSiteId(), $itemUpd->getSiteId()); |
|
| 93 | + $this->assertEquals($itemExp->getType(), $itemUpd->getType()); |
|
| 94 | + $this->assertEquals($itemExp->getLanguageId(), $itemUpd->getLanguageId()); |
|
| 95 | + $this->assertEquals($itemExp->getValue(), $itemUpd->getValue()); |
|
| 96 | + |
|
| 97 | + $this->assertEquals($context->getEditor(), $itemUpd->getEditor()); |
|
| 98 | + $this->assertEquals($itemExp->getTimeCreated(), $itemUpd->getTimeCreated()); |
|
| 99 | + $this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemUpd->getTimeModified()); |
|
| 100 | + |
|
| 101 | + $this->assertInstanceOf(\Aimeos\MShop\Common\Item\Iface::class, $resultSaved); |
|
| 102 | + $this->assertInstanceOf(\Aimeos\MShop\Common\Item\Iface::class, $resultUpd); |
|
| 103 | + |
|
| 104 | + $this->setExpectedException('\\Aimeos\\MShop\\Exception'); |
|
| 105 | + $this->object->getItem($itemSaved->getId()); |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | |
@@ -110,18 +110,18 @@ discard block |
||
| 110 | 110 | { |
| 111 | 111 | $search = $this->object->createSearch(); |
| 112 | 112 | $conditions = array( |
| 113 | - $search->compare( '~=', 'customer.property.value', '1'), |
|
| 114 | - $search->compare( '==', 'customer.property.editor', $this->editor ) |
|
| 113 | + $search->compare('~=', 'customer.property.value', '1'), |
|
| 114 | + $search->compare('==', 'customer.property.editor', $this->editor) |
|
| 115 | 115 | ); |
| 116 | - $search->setConditions( $search->combine( '&&', $conditions ) ); |
|
| 117 | - $results = $this->object->searchItems( $search ); |
|
| 116 | + $search->setConditions($search->combine('&&', $conditions)); |
|
| 117 | + $results = $this->object->searchItems($search); |
|
| 118 | 118 | |
| 119 | - if( ($expected = reset($results)) === false ) { |
|
| 120 | - throw new \RuntimeException( sprintf( 'No customer property item found for value "%1$s".', '1' ) ); |
|
| 119 | + if (($expected = reset($results)) === false) { |
|
| 120 | + throw new \RuntimeException(sprintf('No customer property item found for value "%1$s".', '1')); |
|
| 121 | 121 | } |
| 122 | 122 | |
| 123 | - $actual = $this->object->getItem( $expected->getId() ); |
|
| 124 | - $this->assertEquals( $expected, $actual ); |
|
| 123 | + $actual = $this->object->getItem($expected->getId()); |
|
| 124 | + $this->assertEquals($expected, $actual); |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | |
@@ -129,14 +129,14 @@ discard block |
||
| 129 | 129 | { |
| 130 | 130 | $result = $this->object->getResourceType(); |
| 131 | 131 | |
| 132 | - $this->assertContains( 'customer/property', $result ); |
|
| 132 | + $this->assertContains('customer/property', $result); |
|
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | |
| 136 | 136 | public function testGetSearchAttributes() |
| 137 | 137 | { |
| 138 | - foreach( $this->object->getSearchAttributes() as $attribute ) { |
|
| 139 | - $this->assertInstanceOf( '\\Aimeos\\MW\\Criteria\\Attribute\\Iface', $attribute ); |
|
| 138 | + foreach ($this->object->getSearchAttributes() as $attribute) { |
|
| 139 | + $this->assertInstanceOf('\\Aimeos\\MW\\Criteria\\Attribute\\Iface', $attribute); |
|
| 140 | 140 | } |
| 141 | 141 | } |
| 142 | 142 | |
@@ -147,24 +147,24 @@ discard block |
||
| 147 | 147 | $search = $this->object->createSearch(); |
| 148 | 148 | |
| 149 | 149 | $expr = []; |
| 150 | - $expr[] = $search->compare( '!=', 'customer.property.id', null ); |
|
| 151 | - $expr[] = $search->compare( '!=', 'customer.property.parentid', null ); |
|
| 152 | - $expr[] = $search->compare( '!=', 'customer.property.siteid', null ); |
|
| 153 | - $expr[] = $search->compare( '==', 'customer.property.type', 'newsletter' ); |
|
| 154 | - $expr[] = $search->compare( '==', 'customer.property.languageid', null ); |
|
| 155 | - $expr[] = $search->compare( '==', 'customer.property.value', '1' ); |
|
| 156 | - $expr[] = $search->compare( '==', 'customer.property.editor', $this->editor ); |
|
| 157 | - |
|
| 158 | - $search->setConditions( $search->combine('&&', $expr) ); |
|
| 159 | - $results = $this->object->searchItems( $search, [], $total ); |
|
| 160 | - $this->assertEquals( 1, count( $results ) ); |
|
| 150 | + $expr[] = $search->compare('!=', 'customer.property.id', null); |
|
| 151 | + $expr[] = $search->compare('!=', 'customer.property.parentid', null); |
|
| 152 | + $expr[] = $search->compare('!=', 'customer.property.siteid', null); |
|
| 153 | + $expr[] = $search->compare('==', 'customer.property.type', 'newsletter'); |
|
| 154 | + $expr[] = $search->compare('==', 'customer.property.languageid', null); |
|
| 155 | + $expr[] = $search->compare('==', 'customer.property.value', '1'); |
|
| 156 | + $expr[] = $search->compare('==', 'customer.property.editor', $this->editor); |
|
| 157 | + |
|
| 158 | + $search->setConditions($search->combine('&&', $expr)); |
|
| 159 | + $results = $this->object->searchItems($search, [], $total); |
|
| 160 | + $this->assertEquals(1, count($results)); |
|
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | |
| 164 | 164 | public function testGetSubManager() |
| 165 | 165 | { |
| 166 | - $this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type') ); |
|
| 167 | - $this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type', 'Standard') ); |
|
| 166 | + $this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type')); |
|
| 167 | + $this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type', 'Standard')); |
|
| 168 | 168 | |
| 169 | 169 | $this->setExpectedException('\\Aimeos\\MShop\\Exception'); |
| 170 | 170 | $this->object->getSubManager('unknown'); |
@@ -104,14 +104,14 @@ discard block |
||
| 104 | 104 | * |
| 105 | 105 | * @param array $siteids List of IDs for sites whose entries should be deleted |
| 106 | 106 | */ |
| 107 | - public function cleanup( array $siteids ) |
|
| 107 | + public function cleanup(array $siteids) |
|
| 108 | 108 | { |
| 109 | 109 | $path = 'mshop/customer/manager/property/type/submanagers'; |
| 110 | - foreach( $this->getContext()->getConfig()->get( $path, [] ) as $domain ) { |
|
| 111 | - $this->getObject()->getSubManager( $domain )->cleanup( $siteids ); |
|
| 110 | + foreach ($this->getContext()->getConfig()->get($path, []) as $domain) { |
|
| 111 | + $this->getObject()->getSubManager($domain)->cleanup($siteids); |
|
| 112 | 112 | } |
| 113 | 113 | |
| 114 | - $this->cleanupBase( $siteids, 'mshop/customer/manager/property/type/fosuser/delete' ); |
|
| 114 | + $this->cleanupBase($siteids, 'mshop/customer/manager/property/type/fosuser/delete'); |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | |
@@ -121,11 +121,11 @@ discard block |
||
| 121 | 121 | * @param boolean $withsub Return also attributes of sub-managers if true |
| 122 | 122 | * @return array Returns a list of attribtes implementing \Aimeos\MW\Criteria\Attribute\Iface |
| 123 | 123 | */ |
| 124 | - public function getSearchAttributes( $withsub = true ) |
|
| 124 | + public function getSearchAttributes($withsub = true) |
|
| 125 | 125 | { |
| 126 | 126 | $path = 'mshop/customer/manager/property/type/submanagers'; |
| 127 | 127 | |
| 128 | - return $this->getSearchAttributesBase( $this->searchConfig, $path, [], $withsub ); |
|
| 128 | + return $this->getSearchAttributesBase($this->searchConfig, $path, [], $withsub); |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | |
@@ -136,9 +136,9 @@ discard block |
||
| 136 | 136 | * @param string|null $name Name of the implementation, will be from configuration (or Default) if null |
| 137 | 137 | * @return \Aimeos\MShop\Common\Manager\Iface Manager for different extensions, e.g types, lists etc. |
| 138 | 138 | */ |
| 139 | - public function getSubManager( $manager, $name = null ) |
|
| 139 | + public function getSubManager($manager, $name = null) |
|
| 140 | 140 | { |
| 141 | - return $this->getSubManagerBase( 'customer', 'property/type/' . $manager, ( $name === null ? 'FosUser' : $name ) ); |
|
| 141 | + return $this->getSubManagerBase('customer', 'property/type/' . $manager, ($name === null ? 'FosUser' : $name)); |
|
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | 'customer.property.id' => array( |
| 25 | 25 | 'code' => 'customer.property.id', |
| 26 | 26 | 'internalcode' => 'fospr."id"', |
| 27 | - 'internaldeps'=>array( 'LEFT JOIN "fos_user_property" AS fospr ON ( fospr."parentid" = fos."id" )' ), |
|
| 27 | + 'internaldeps'=>array('LEFT JOIN "fos_user_property" AS fospr ON ( fospr."parentid" = fos."id" )'), |
|
| 28 | 28 | 'label' => 'Property ID', |
| 29 | 29 | 'type' => 'integer', |
| 30 | 30 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT, |
@@ -99,14 +99,14 @@ discard block |
||
| 99 | 99 | * |
| 100 | 100 | * @param integer[] $siteids List of IDs for sites whose entries should be deleted |
| 101 | 101 | */ |
| 102 | - public function cleanup( array $siteids ) |
|
| 102 | + public function cleanup(array $siteids) |
|
| 103 | 103 | { |
| 104 | 104 | $path = 'mshop/customer/manager/property/submanagers'; |
| 105 | - foreach( $this->getContext()->getConfig()->get( $path, [] ) as $domain ) { |
|
| 106 | - $this->getObject()->getSubManager( $domain )->cleanup( $siteids ); |
|
| 105 | + foreach ($this->getContext()->getConfig()->get($path, []) as $domain) { |
|
| 106 | + $this->getObject()->getSubManager($domain)->cleanup($siteids); |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | - $this->cleanupBase( $siteids, 'mshop/customer/manager/property/fosuser/delete' ); |
|
| 109 | + $this->cleanupBase($siteids, 'mshop/customer/manager/property/fosuser/delete'); |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | |
@@ -116,11 +116,11 @@ discard block |
||
| 116 | 116 | * @param boolean $withsub Return also attributes of sub-managers if true |
| 117 | 117 | * @return array Returns a list of attribtes implementing \Aimeos\MW\Criteria\Attribute\Iface |
| 118 | 118 | */ |
| 119 | - public function getSearchAttributes( $withsub = true ) |
|
| 119 | + public function getSearchAttributes($withsub = true) |
|
| 120 | 120 | { |
| 121 | 121 | $path = 'mshop/customer/manager/property/submanagers'; |
| 122 | 122 | |
| 123 | - return $this->getSearchAttributesBase( $this->searchConfig, $path, [], $withsub ); |
|
| 123 | + return $this->getSearchAttributesBase($this->searchConfig, $path, [], $withsub); |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | |
@@ -132,9 +132,9 @@ discard block |
||
| 132 | 132 | * configuration (or Default) if null |
| 133 | 133 | * @return \Aimeos\MShop\Common\Manager\Iface Manager for different extensions, e.g property types, property lists etc. |
| 134 | 134 | */ |
| 135 | - public function getSubManager( $manager, $name = null ) |
|
| 135 | + public function getSubManager($manager, $name = null) |
|
| 136 | 136 | { |
| 137 | - return $this->getSubManagerBase( 'customer', 'property/' . $manager, ( $name === null ? 'FosUser' : $name ) ); |
|
| 137 | + return $this->getSubManagerBase('customer', 'property/' . $manager, ($name === null ? 'FosUser' : $name)); |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | |
@@ -57,25 +57,25 @@ |
||
| 57 | 57 | */ |
| 58 | 58 | public function migrate() |
| 59 | 59 | { |
| 60 | - $this->msg( sprintf( 'Add new type columns for FosUser' ), 0 ); |
|
| 61 | - $this->status( '' ); |
|
| 60 | + $this->msg(sprintf('Add new type columns for FosUser'), 0); |
|
| 61 | + $this->status(''); |
|
| 62 | 62 | |
| 63 | - foreach( $this->tables as $rname => $list ) { |
|
| 64 | - $this->addColumn( $rname, $list ); |
|
| 63 | + foreach ($this->tables as $rname => $list) { |
|
| 64 | + $this->addColumn($rname, $list); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - $this->msg( sprintf( 'Drop old unique indexes for FosUser' ), 0 ); |
|
| 68 | - $this->status( '' ); |
|
| 67 | + $this->msg(sprintf('Drop old unique indexes for FosUser'), 0); |
|
| 68 | + $this->status(''); |
|
| 69 | 69 | |
| 70 | - foreach( $this->constraints as $rname => $list ) { |
|
| 71 | - $this->dropIndex( $rname, $list ); |
|
| 70 | + foreach ($this->constraints as $rname => $list) { |
|
| 71 | + $this->dropIndex($rname, $list); |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | - $this->msg( sprintf( 'Migrate typeid to type for FosUser' ), 0 ); |
|
| 75 | - $this->status( '' ); |
|
| 74 | + $this->msg(sprintf('Migrate typeid to type for FosUser'), 0); |
|
| 75 | + $this->status(''); |
|
| 76 | 76 | |
| 77 | - foreach( $this->migrations as $rname => $list ) { |
|
| 78 | - $this->migrateData( $rname, $list ); |
|
| 77 | + foreach ($this->migrations as $rname => $list) { |
|
| 78 | + $this->migrateData($rname, $list); |
|
| 79 | 79 | } |
| 80 | 80 | } |
| 81 | 81 | } |
| 82 | 82 | \ No newline at end of file |
@@ -5,12 +5,12 @@ |
||
| 5 | 5 | * @copyright Aimeos (aimeos.org), 2018 |
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | -return array ( |
|
| 8 | +return array( |
|
| 9 | 9 | 'customer/property/type' => array( |
| 10 | - 'customer/property/type/newsletter' => array( 'domain' => 'customer', 'code' => 'newsletter', 'label' => 'Newsletter', 'status' => 1 ), |
|
| 10 | + 'customer/property/type/newsletter' => array('domain' => 'customer', 'code' => 'newsletter', 'label' => 'Newsletter', 'status' => 1), |
|
| 11 | 11 | ), |
| 12 | 12 | |
| 13 | 13 | 'customer/property' => array( |
| 14 | - 'customer/property/UTC001/newsletter' => array( 'parentid' => 'customer/UTC001', 'type' => 'newsletter', 'langid' => null, 'value' => '1' ), |
|
| 14 | + 'customer/property/UTC001/newsletter' => array('parentid' => 'customer/UTC001', 'type' => 'newsletter', 'langid' => null, 'value' => '1'), |
|
| 15 | 15 | ), |
| 16 | 16 | ); |
| 17 | 17 | \ No newline at end of file |
@@ -5,19 +5,19 @@ |
||
| 5 | 5 | * @copyright Aimeos (aimeos.org), 2014-2018 |
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | -return array ( |
|
| 9 | - 'customer/lists/type' => array ( |
|
| 10 | - 'customer/group/default' => array( 'domain' => 'customer/group', 'code' => 'default', 'label' => 'Standard', 'status' => 1 ), |
|
| 11 | - 'order/download' => array( 'domain' => 'order', 'code' => 'download', 'label' => 'Download', 'status' => 1 ), |
|
| 12 | - 'product/favorite' => array( 'domain' => 'product', 'code' => 'favorite', 'label' => 'Favorite', 'status' => 1 ), |
|
| 13 | - 'product/watch' => array( 'domain' => 'product', 'code' => 'watch', 'label' => 'Watch list', 'status' => 1 ), |
|
| 14 | - 'text/default' => array( 'domain' => 'text', 'code' => 'default', 'label' => 'Standard', 'status' => 1 ), |
|
| 8 | +return array( |
|
| 9 | + 'customer/lists/type' => array( |
|
| 10 | + 'customer/group/default' => array('domain' => 'customer/group', 'code' => 'default', 'label' => 'Standard', 'status' => 1), |
|
| 11 | + 'order/download' => array('domain' => 'order', 'code' => 'download', 'label' => 'Download', 'status' => 1), |
|
| 12 | + 'product/favorite' => array('domain' => 'product', 'code' => 'favorite', 'label' => 'Favorite', 'status' => 1), |
|
| 13 | + 'product/watch' => array('domain' => 'product', 'code' => 'watch', 'label' => 'Watch list', 'status' => 1), |
|
| 14 | + 'text/default' => array('domain' => 'text', 'code' => 'default', 'label' => 'Standard', 'status' => 1), |
|
| 15 | 15 | ), |
| 16 | 16 | |
| 17 | - 'customer/lists' => array ( |
|
| 18 | - array( 'parentid' => 'customer/UTC003', 'type' => 'default', 'domain' => 'text', 'refid' => 'text/customer/information', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => [], 'pos' => 1, 'status' => 1 ), |
|
| 19 | - array( 'parentid' => 'customer/UTC003', 'type' => 'default', 'domain' => 'text', 'refid' => 'text/customer/notify', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => [], 'pos' => 2, 'status' => 1 ), |
|
| 20 | - array( 'parentid' => 'customer/UTC003', 'type' => 'default', 'domain' => 'text', 'refid' => 'text/customer/newsletter', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => [], 'pos' => 3, 'status' => 1 ), |
|
| 21 | - array( 'parentid' => 'customer/UTC001', 'type' => 'default', 'domain' => 'text', 'refid' => 'text/customer/information', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => [], 'pos' => 1, 'status' => 1 ), |
|
| 17 | + 'customer/lists' => array( |
|
| 18 | + array('parentid' => 'customer/UTC003', 'type' => 'default', 'domain' => 'text', 'refid' => 'text/customer/information', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => [], 'pos' => 1, 'status' => 1), |
|
| 19 | + array('parentid' => 'customer/UTC003', 'type' => 'default', 'domain' => 'text', 'refid' => 'text/customer/notify', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => [], 'pos' => 2, 'status' => 1), |
|
| 20 | + array('parentid' => 'customer/UTC003', 'type' => 'default', 'domain' => 'text', 'refid' => 'text/customer/newsletter', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => [], 'pos' => 3, 'status' => 1), |
|
| 21 | + array('parentid' => 'customer/UTC001', 'type' => 'default', 'domain' => 'text', 'refid' => 'text/customer/information', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => [], 'pos' => 1, 'status' => 1), |
|
| 22 | 22 | ), |
| 23 | 23 | ); |
@@ -8,207 +8,207 @@ |
||
| 8 | 8 | |
| 9 | 9 | return array( |
| 10 | 10 | 'table' => array( |
| 11 | - 'fos_user' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
| 12 | - |
|
| 13 | - $table = $schema->createTable( 'fos_user' ); |
|
| 14 | - |
|
| 15 | - $table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) ); |
|
| 16 | - $table->addColumn( 'siteid', 'integer', array( 'notnull' => false ) ); |
|
| 17 | - $table->addColumn( 'username', 'string', array( 'length' => 180 ) ); |
|
| 18 | - $table->addColumn( 'username_canonical', 'string', array( 'length' => 180 ) ); |
|
| 19 | - $table->addColumn( 'email', 'string', array( 'length' => 180 ) ); |
|
| 20 | - $table->addColumn( 'email_canonical', 'string', array( 'length' => 180 ) ); |
|
| 21 | - $table->addColumn( 'enabled', 'boolean', [] ); |
|
| 22 | - $table->addColumn( 'salt', 'string', array( 'length' => 255, 'notnull' => false ) ); |
|
| 23 | - $table->addColumn( 'password', 'string', array( 'length' => 255 ) ); |
|
| 24 | - $table->addColumn( 'last_login', 'datetime', array( 'notnull' => false ) ); |
|
| 25 | - $table->addColumn( 'confirmation_token', 'string', array( 'length' => 180, 'notnull' => false ) ); |
|
| 26 | - $table->addColumn( 'password_requested_at', 'datetime', array( 'notnull' => false ) ); |
|
| 27 | - $table->addColumn( 'roles', 'text', array( 'length' => 0x7fffffff, 'comment' => '(DC2Type:array)' ) ); |
|
| 28 | - $table->addColumn( 'salutation', 'string', array( 'length' => 8 ) ); |
|
| 29 | - $table->addColumn( 'company', 'string', array( 'length' => 100 ) ); |
|
| 30 | - $table->addColumn( 'vatid', 'string', array( 'length' => 32 ) ); |
|
| 31 | - $table->addColumn( 'title', 'string', array( 'length' => 64 ) ); |
|
| 32 | - $table->addColumn( 'firstname', 'string', array( 'length' => 64 ) ); |
|
| 33 | - $table->addColumn( 'lastname', 'string', array( 'length' => 64 ) ); |
|
| 34 | - $table->addColumn( 'address1', 'string', array( 'length' => 200 ) ); |
|
| 35 | - $table->addColumn( 'address2', 'string', array( 'length' => 200 ) ); |
|
| 36 | - $table->addColumn( 'address3', 'string', array( 'length' => 200 ) ); |
|
| 37 | - $table->addColumn( 'postal', 'string', array( 'length' => 16 ) ); |
|
| 38 | - $table->addColumn( 'city', 'string', array( 'length' => 200 ) ); |
|
| 39 | - $table->addColumn( 'state', 'string', array( 'length' => 200 ) ); |
|
| 40 | - $table->addColumn( 'langid', 'string', array( 'length' => 5, 'notnull' => false ) ); |
|
| 41 | - $table->addColumn( 'countryid', 'string', array( 'length' => 2, 'notnull' => false, 'fixed' => true ) ); |
|
| 42 | - $table->addColumn( 'telephone', 'string', array( 'length' => 32 ) ); |
|
| 43 | - $table->addColumn( 'telefax', 'string', array( 'length' => 32 ) ); |
|
| 44 | - $table->addColumn( 'website', 'string', array( 'length' => 255 ) ); |
|
| 45 | - $table->addColumn( 'longitude', 'float', array( 'notnull' => false ) ); |
|
| 46 | - $table->addColumn( 'latitude', 'float', array( 'notnull' => false ) ); |
|
| 47 | - $table->addColumn( 'birthday', 'date', array( 'notnull' => false ) ); |
|
| 48 | - $table->addColumn( 'vdate', 'date', array( 'notnull' => false ) ); |
|
| 49 | - $table->addColumn( 'mtime', 'datetime', array( 'notnull' => false ) ); |
|
| 50 | - $table->addColumn( 'ctime', 'datetime', array( 'notnull' => false ) ); |
|
| 51 | - $table->addColumn( 'editor', 'string', array('length' => 255 ) ); |
|
| 52 | - |
|
| 53 | - $table->setPrimaryKey( array( 'id' ), 'pk_fosus_id' ); |
|
| 54 | - $table->addUniqueIndex( array( 'confirmation_token' ), 'unq_fosus_confirmtoken' ); |
|
| 55 | - $table->addUniqueIndex( array( 'username_canonical' ), 'unq_fosus_username' ); |
|
| 56 | - $table->addUniqueIndex( array( 'email_canonical' ), 'unq_fosus_email' ); |
|
| 57 | - $table->addIndex( array( 'langid' ), 'idx_fosus_langid' ); |
|
| 58 | - $table->addIndex( array( 'lastname', 'firstname' ), 'idx_fosus_last_first' ); |
|
| 59 | - $table->addIndex( array( 'postal', 'address1' ), 'idx_fosus_post_addr1' ); |
|
| 60 | - $table->addIndex( array( 'postal', 'city' ), 'idx_fosus_post_city' ); |
|
| 61 | - $table->addIndex( array( 'lastname' ), 'idx_fosus_lastname' ); |
|
| 62 | - $table->addIndex( array( 'address1' ), 'idx_fosus_address1' ); |
|
| 63 | - $table->addIndex( array( 'city' ), 'idx_fosus_city' ); |
|
| 11 | + 'fos_user' => function(\Doctrine\DBAL\Schema\Schema $schema) { |
|
| 12 | + |
|
| 13 | + $table = $schema->createTable('fos_user'); |
|
| 14 | + |
|
| 15 | + $table->addColumn('id', 'integer', array('autoincrement' => true)); |
|
| 16 | + $table->addColumn('siteid', 'integer', array('notnull' => false)); |
|
| 17 | + $table->addColumn('username', 'string', array('length' => 180)); |
|
| 18 | + $table->addColumn('username_canonical', 'string', array('length' => 180)); |
|
| 19 | + $table->addColumn('email', 'string', array('length' => 180)); |
|
| 20 | + $table->addColumn('email_canonical', 'string', array('length' => 180)); |
|
| 21 | + $table->addColumn('enabled', 'boolean', []); |
|
| 22 | + $table->addColumn('salt', 'string', array('length' => 255, 'notnull' => false)); |
|
| 23 | + $table->addColumn('password', 'string', array('length' => 255)); |
|
| 24 | + $table->addColumn('last_login', 'datetime', array('notnull' => false)); |
|
| 25 | + $table->addColumn('confirmation_token', 'string', array('length' => 180, 'notnull' => false)); |
|
| 26 | + $table->addColumn('password_requested_at', 'datetime', array('notnull' => false)); |
|
| 27 | + $table->addColumn('roles', 'text', array('length' => 0x7fffffff, 'comment' => '(DC2Type:array)')); |
|
| 28 | + $table->addColumn('salutation', 'string', array('length' => 8)); |
|
| 29 | + $table->addColumn('company', 'string', array('length' => 100)); |
|
| 30 | + $table->addColumn('vatid', 'string', array('length' => 32)); |
|
| 31 | + $table->addColumn('title', 'string', array('length' => 64)); |
|
| 32 | + $table->addColumn('firstname', 'string', array('length' => 64)); |
|
| 33 | + $table->addColumn('lastname', 'string', array('length' => 64)); |
|
| 34 | + $table->addColumn('address1', 'string', array('length' => 200)); |
|
| 35 | + $table->addColumn('address2', 'string', array('length' => 200)); |
|
| 36 | + $table->addColumn('address3', 'string', array('length' => 200)); |
|
| 37 | + $table->addColumn('postal', 'string', array('length' => 16)); |
|
| 38 | + $table->addColumn('city', 'string', array('length' => 200)); |
|
| 39 | + $table->addColumn('state', 'string', array('length' => 200)); |
|
| 40 | + $table->addColumn('langid', 'string', array('length' => 5, 'notnull' => false)); |
|
| 41 | + $table->addColumn('countryid', 'string', array('length' => 2, 'notnull' => false, 'fixed' => true)); |
|
| 42 | + $table->addColumn('telephone', 'string', array('length' => 32)); |
|
| 43 | + $table->addColumn('telefax', 'string', array('length' => 32)); |
|
| 44 | + $table->addColumn('website', 'string', array('length' => 255)); |
|
| 45 | + $table->addColumn('longitude', 'float', array('notnull' => false)); |
|
| 46 | + $table->addColumn('latitude', 'float', array('notnull' => false)); |
|
| 47 | + $table->addColumn('birthday', 'date', array('notnull' => false)); |
|
| 48 | + $table->addColumn('vdate', 'date', array('notnull' => false)); |
|
| 49 | + $table->addColumn('mtime', 'datetime', array('notnull' => false)); |
|
| 50 | + $table->addColumn('ctime', 'datetime', array('notnull' => false)); |
|
| 51 | + $table->addColumn('editor', 'string', array('length' => 255)); |
|
| 52 | + |
|
| 53 | + $table->setPrimaryKey(array('id'), 'pk_fosus_id'); |
|
| 54 | + $table->addUniqueIndex(array('confirmation_token'), 'unq_fosus_confirmtoken'); |
|
| 55 | + $table->addUniqueIndex(array('username_canonical'), 'unq_fosus_username'); |
|
| 56 | + $table->addUniqueIndex(array('email_canonical'), 'unq_fosus_email'); |
|
| 57 | + $table->addIndex(array('langid'), 'idx_fosus_langid'); |
|
| 58 | + $table->addIndex(array('lastname', 'firstname'), 'idx_fosus_last_first'); |
|
| 59 | + $table->addIndex(array('postal', 'address1'), 'idx_fosus_post_addr1'); |
|
| 60 | + $table->addIndex(array('postal', 'city'), 'idx_fosus_post_city'); |
|
| 61 | + $table->addIndex(array('lastname'), 'idx_fosus_lastname'); |
|
| 62 | + $table->addIndex(array('address1'), 'idx_fosus_address1'); |
|
| 63 | + $table->addIndex(array('city'), 'idx_fosus_city'); |
|
| 64 | 64 | |
| 65 | 65 | return $schema; |
| 66 | 66 | }, |
| 67 | 67 | |
| 68 | - 'fos_user_address' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
| 69 | - |
|
| 70 | - $table = $schema->createTable( 'fos_user_address' ); |
|
| 71 | - |
|
| 72 | - $table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) ); |
|
| 73 | - $table->addColumn( 'siteid', 'integer', [] ); |
|
| 74 | - $table->addColumn( 'parentid', 'integer', [] ); |
|
| 75 | - $table->addColumn( 'pos', 'smallint', [] ); |
|
| 76 | - $table->addColumn( 'company', 'string', array( 'length' => 100 ) ); |
|
| 77 | - $table->addColumn( 'vatid', 'string', array( 'length' => 32 ) ); |
|
| 78 | - $table->addColumn( 'salutation', 'string', array( 'length' => 8 ) ); |
|
| 79 | - $table->addColumn( 'title', 'string', array( 'length' => 64 ) ); |
|
| 80 | - $table->addColumn( 'firstname', 'string', array( 'length' => 64 ) ); |
|
| 81 | - $table->addColumn( 'lastname', 'string', array( 'length' => 64 ) ); |
|
| 82 | - $table->addColumn( 'address1', 'string', array( 'length' => 200 ) ); |
|
| 83 | - $table->addColumn( 'address2', 'string', array( 'length' => 200 ) ); |
|
| 84 | - $table->addColumn( 'address3', 'string', array( 'length' => 200 ) ); |
|
| 85 | - $table->addColumn( 'postal', 'string', array( 'length' => 16 ) ); |
|
| 86 | - $table->addColumn( 'city', 'string', array( 'length' => 200 ) ); |
|
| 87 | - $table->addColumn( 'state', 'string', array( 'length' => 200 ) ); |
|
| 88 | - $table->addColumn( 'langid', 'string', array( 'length' => 5, 'notnull' => false ) ); |
|
| 89 | - $table->addColumn( 'countryid', 'string', array( 'length' => 2, 'notnull' => false, 'fixed' => true ) ); |
|
| 90 | - $table->addColumn( 'telephone', 'string', array( 'length' => 32 ) ); |
|
| 91 | - $table->addColumn( 'email', 'string', array( 'length' => 255 ) ); |
|
| 92 | - $table->addColumn( 'telefax', 'string', array( 'length' => 255 ) ); |
|
| 93 | - $table->addColumn( 'website', 'string', array( 'length' => 255 ) ); |
|
| 94 | - $table->addColumn( 'longitude', 'float', array( 'notnull' => false ) ); |
|
| 95 | - $table->addColumn( 'latitude', 'float', array( 'notnull' => false ) ); |
|
| 96 | - $table->addColumn( 'mtime', 'datetime', [] ); |
|
| 97 | - $table->addColumn( 'ctime', 'datetime', [] ); |
|
| 98 | - $table->addColumn( 'editor', 'string', array('length' => 255 ) ); |
|
| 99 | - |
|
| 100 | - $table->setPrimaryKey( array( 'id' ), 'pk_fosad_id' ); |
|
| 101 | - $table->addIndex( array( 'parentid' ), 'idx_fosad_pid' ); |
|
| 102 | - $table->addIndex( array( 'lastname', 'firstname' ), 'idx_fosad_last_first' ); |
|
| 103 | - $table->addIndex( array( 'postal', 'address1' ), 'idx_fosad_post_addr1' ); |
|
| 104 | - $table->addIndex( array( 'postal', 'city' ), 'idx_fosad_post_city' ); |
|
| 105 | - $table->addIndex( array( 'address1' ), 'idx_fosad_address1' ); |
|
| 106 | - $table->addIndex( array( 'city' ), 'idx_fosad_city' ); |
|
| 107 | - $table->addIndex( array( 'email' ), 'idx_fosad_email' ); |
|
| 108 | - |
|
| 109 | - $table->addForeignKeyConstraint( 'fos_user', array( 'parentid' ), array( 'id' ), |
|
| 110 | - array( 'onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE' ), 'fk_fosad_pid' ); |
|
| 68 | + 'fos_user_address' => function(\Doctrine\DBAL\Schema\Schema $schema) { |
|
| 69 | + |
|
| 70 | + $table = $schema->createTable('fos_user_address'); |
|
| 71 | + |
|
| 72 | + $table->addColumn('id', 'integer', array('autoincrement' => true)); |
|
| 73 | + $table->addColumn('siteid', 'integer', []); |
|
| 74 | + $table->addColumn('parentid', 'integer', []); |
|
| 75 | + $table->addColumn('pos', 'smallint', []); |
|
| 76 | + $table->addColumn('company', 'string', array('length' => 100)); |
|
| 77 | + $table->addColumn('vatid', 'string', array('length' => 32)); |
|
| 78 | + $table->addColumn('salutation', 'string', array('length' => 8)); |
|
| 79 | + $table->addColumn('title', 'string', array('length' => 64)); |
|
| 80 | + $table->addColumn('firstname', 'string', array('length' => 64)); |
|
| 81 | + $table->addColumn('lastname', 'string', array('length' => 64)); |
|
| 82 | + $table->addColumn('address1', 'string', array('length' => 200)); |
|
| 83 | + $table->addColumn('address2', 'string', array('length' => 200)); |
|
| 84 | + $table->addColumn('address3', 'string', array('length' => 200)); |
|
| 85 | + $table->addColumn('postal', 'string', array('length' => 16)); |
|
| 86 | + $table->addColumn('city', 'string', array('length' => 200)); |
|
| 87 | + $table->addColumn('state', 'string', array('length' => 200)); |
|
| 88 | + $table->addColumn('langid', 'string', array('length' => 5, 'notnull' => false)); |
|
| 89 | + $table->addColumn('countryid', 'string', array('length' => 2, 'notnull' => false, 'fixed' => true)); |
|
| 90 | + $table->addColumn('telephone', 'string', array('length' => 32)); |
|
| 91 | + $table->addColumn('email', 'string', array('length' => 255)); |
|
| 92 | + $table->addColumn('telefax', 'string', array('length' => 255)); |
|
| 93 | + $table->addColumn('website', 'string', array('length' => 255)); |
|
| 94 | + $table->addColumn('longitude', 'float', array('notnull' => false)); |
|
| 95 | + $table->addColumn('latitude', 'float', array('notnull' => false)); |
|
| 96 | + $table->addColumn('mtime', 'datetime', []); |
|
| 97 | + $table->addColumn('ctime', 'datetime', []); |
|
| 98 | + $table->addColumn('editor', 'string', array('length' => 255)); |
|
| 99 | + |
|
| 100 | + $table->setPrimaryKey(array('id'), 'pk_fosad_id'); |
|
| 101 | + $table->addIndex(array('parentid'), 'idx_fosad_pid'); |
|
| 102 | + $table->addIndex(array('lastname', 'firstname'), 'idx_fosad_last_first'); |
|
| 103 | + $table->addIndex(array('postal', 'address1'), 'idx_fosad_post_addr1'); |
|
| 104 | + $table->addIndex(array('postal', 'city'), 'idx_fosad_post_city'); |
|
| 105 | + $table->addIndex(array('address1'), 'idx_fosad_address1'); |
|
| 106 | + $table->addIndex(array('city'), 'idx_fosad_city'); |
|
| 107 | + $table->addIndex(array('email'), 'idx_fosad_email'); |
|
| 108 | + |
|
| 109 | + $table->addForeignKeyConstraint('fos_user', array('parentid'), array('id'), |
|
| 110 | + array('onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE'), 'fk_fosad_pid'); |
|
| 111 | 111 | |
| 112 | 112 | return $schema; |
| 113 | 113 | }, |
| 114 | 114 | |
| 115 | - 'fos_user_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
| 115 | + 'fos_user_list_type' => function(\Doctrine\DBAL\Schema\Schema $schema) { |
|
| 116 | 116 | |
| 117 | - $table = $schema->createTable( 'fos_user_list_type' ); |
|
| 117 | + $table = $schema->createTable('fos_user_list_type'); |
|
| 118 | 118 | |
| 119 | - $table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) ); |
|
| 120 | - $table->addColumn( 'siteid', 'integer', [] ); |
|
| 121 | - $table->addColumn( 'domain', 'string', array( 'length' => 32 ) ); |
|
| 122 | - $table->addColumn( 'code', 'string', array( 'length' => 32 ) ); |
|
| 123 | - $table->addColumn( 'label', 'string', array( 'length' => 255 ) ); |
|
| 124 | - $table->addColumn( 'pos', 'integer', ['default' => 0] ); |
|
| 125 | - $table->addColumn( 'status', 'smallint', [] ); |
|
| 126 | - $table->addColumn( 'mtime', 'datetime', [] ); |
|
| 127 | - $table->addColumn( 'ctime', 'datetime', [] ); |
|
| 128 | - $table->addColumn( 'editor', 'string', array( 'length' => 255 ) ); |
|
| 119 | + $table->addColumn('id', 'integer', array('autoincrement' => true)); |
|
| 120 | + $table->addColumn('siteid', 'integer', []); |
|
| 121 | + $table->addColumn('domain', 'string', array('length' => 32)); |
|
| 122 | + $table->addColumn('code', 'string', array('length' => 32)); |
|
| 123 | + $table->addColumn('label', 'string', array('length' => 255)); |
|
| 124 | + $table->addColumn('pos', 'integer', ['default' => 0]); |
|
| 125 | + $table->addColumn('status', 'smallint', []); |
|
| 126 | + $table->addColumn('mtime', 'datetime', []); |
|
| 127 | + $table->addColumn('ctime', 'datetime', []); |
|
| 128 | + $table->addColumn('editor', 'string', array('length' => 255)); |
|
| 129 | 129 | |
| 130 | - $table->setPrimaryKey( array( 'id' ), 'pk_foslity_id' ); |
|
| 131 | - $table->addUniqueIndex( array( 'siteid', 'domain', 'code' ), 'unq_foslity_sid_dom_code' ); |
|
| 132 | - $table->addIndex( array( 'siteid', 'status', 'pos' ), 'idx_foslity_sid_status_pos' ); |
|
| 133 | - $table->addIndex( array( 'siteid', 'label' ), 'idx_foslity_sid_label' ); |
|
| 134 | - $table->addIndex( array( 'siteid', 'code' ), 'idx_foslity_sid_code' ); |
|
| 130 | + $table->setPrimaryKey(array('id'), 'pk_foslity_id'); |
|
| 131 | + $table->addUniqueIndex(array('siteid', 'domain', 'code'), 'unq_foslity_sid_dom_code'); |
|
| 132 | + $table->addIndex(array('siteid', 'status', 'pos'), 'idx_foslity_sid_status_pos'); |
|
| 133 | + $table->addIndex(array('siteid', 'label'), 'idx_foslity_sid_label'); |
|
| 134 | + $table->addIndex(array('siteid', 'code'), 'idx_foslity_sid_code'); |
|
| 135 | 135 | |
| 136 | 136 | return $schema; |
| 137 | 137 | }, |
| 138 | 138 | |
| 139 | - 'fos_user_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
| 139 | + 'fos_user_list' => function(\Doctrine\DBAL\Schema\Schema $schema) { |
|
| 140 | 140 | |
| 141 | - $table = $schema->createTable( 'fos_user_list' ); |
|
| 141 | + $table = $schema->createTable('fos_user_list'); |
|
| 142 | 142 | |
| 143 | - $table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) ); |
|
| 144 | - $table->addColumn( 'parentid', 'integer', [] ); |
|
| 145 | - $table->addColumn( 'siteid', 'integer', [] ); |
|
| 146 | - $table->addColumn( 'type', 'string', array( 'length' => 32 ) ); |
|
| 147 | - $table->addColumn( 'domain', 'string', array( 'length' => 32 ) ); |
|
| 148 | - $table->addColumn( 'refid', 'string', array( 'length' => 32 ) ); |
|
| 149 | - $table->addColumn( 'start', 'datetime', array( 'notnull' => false ) ); |
|
| 150 | - $table->addColumn( 'end', 'datetime', array( 'notnull' => false ) ); |
|
| 151 | - $table->addColumn( 'config', 'text', array( 'length' => 0xffff ) ); |
|
| 152 | - $table->addColumn( 'pos', 'integer', [] ); |
|
| 153 | - $table->addColumn( 'status', 'smallint', [] ); |
|
| 154 | - $table->addColumn( 'mtime', 'datetime', [] ); |
|
| 155 | - $table->addColumn( 'ctime', 'datetime', [] ); |
|
| 156 | - $table->addColumn( 'editor', 'string', array( 'length' => 255 ) ); |
|
| 143 | + $table->addColumn('id', 'integer', array('autoincrement' => true)); |
|
| 144 | + $table->addColumn('parentid', 'integer', []); |
|
| 145 | + $table->addColumn('siteid', 'integer', []); |
|
| 146 | + $table->addColumn('type', 'string', array('length' => 32)); |
|
| 147 | + $table->addColumn('domain', 'string', array('length' => 32)); |
|
| 148 | + $table->addColumn('refid', 'string', array('length' => 32)); |
|
| 149 | + $table->addColumn('start', 'datetime', array('notnull' => false)); |
|
| 150 | + $table->addColumn('end', 'datetime', array('notnull' => false)); |
|
| 151 | + $table->addColumn('config', 'text', array('length' => 0xffff)); |
|
| 152 | + $table->addColumn('pos', 'integer', []); |
|
| 153 | + $table->addColumn('status', 'smallint', []); |
|
| 154 | + $table->addColumn('mtime', 'datetime', []); |
|
| 155 | + $table->addColumn('ctime', 'datetime', []); |
|
| 156 | + $table->addColumn('editor', 'string', array('length' => 255)); |
|
| 157 | 157 | |
| 158 | - $table->setPrimaryKey( array( 'id' ), 'pk_fosli_id' ); |
|
| 159 | - $table->addUniqueIndex( array( 'parentid', 'siteid', 'domain', 'type', 'refid' ), 'unq_fosli_pid_sid_dm_ty_rid' ); |
|
| 160 | - $table->addIndex( array( 'parentid' ), 'fk_fosli_pid' ); |
|
| 158 | + $table->setPrimaryKey(array('id'), 'pk_fosli_id'); |
|
| 159 | + $table->addUniqueIndex(array('parentid', 'siteid', 'domain', 'type', 'refid'), 'unq_fosli_pid_sid_dm_ty_rid'); |
|
| 160 | + $table->addIndex(array('parentid'), 'fk_fosli_pid'); |
|
| 161 | 161 | |
| 162 | - $table->addForeignKeyConstraint( 'fos_user', array( 'parentid' ), array( 'id' ), |
|
| 163 | - array( 'onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE' ), 'fk_fosli_pid' ); |
|
| 162 | + $table->addForeignKeyConstraint('fos_user', array('parentid'), array('id'), |
|
| 163 | + array('onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE'), 'fk_fosli_pid'); |
|
| 164 | 164 | |
| 165 | 165 | return $schema; |
| 166 | 166 | }, |
| 167 | 167 | |
| 168 | - 'fos_user_property_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
| 168 | + 'fos_user_property_type' => function(\Doctrine\DBAL\Schema\Schema $schema) { |
|
| 169 | 169 | |
| 170 | - $table = $schema->createTable( 'fos_user_property_type' ); |
|
| 170 | + $table = $schema->createTable('fos_user_property_type'); |
|
| 171 | 171 | |
| 172 | - $table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) ); |
|
| 173 | - $table->addColumn( 'siteid', 'integer', [] ); |
|
| 174 | - $table->addColumn( 'domain', 'string', array( 'length' => 32 ) ); |
|
| 175 | - $table->addColumn( 'code', 'string', array( 'length' => 32 ) ); |
|
| 176 | - $table->addColumn( 'label', 'string', array( 'length' => 255 ) ); |
|
| 177 | - $table->addColumn( 'pos', 'integer', ['default' => 0] ); |
|
| 178 | - $table->addColumn( 'status', 'smallint', [] ); |
|
| 179 | - $table->addColumn( 'mtime', 'datetime', [] ); |
|
| 180 | - $table->addColumn( 'ctime', 'datetime', [] ); |
|
| 181 | - $table->addColumn( 'editor', 'string', array( 'length' => 255 ) ); |
|
| 172 | + $table->addColumn('id', 'integer', array('autoincrement' => true)); |
|
| 173 | + $table->addColumn('siteid', 'integer', []); |
|
| 174 | + $table->addColumn('domain', 'string', array('length' => 32)); |
|
| 175 | + $table->addColumn('code', 'string', array('length' => 32)); |
|
| 176 | + $table->addColumn('label', 'string', array('length' => 255)); |
|
| 177 | + $table->addColumn('pos', 'integer', ['default' => 0]); |
|
| 178 | + $table->addColumn('status', 'smallint', []); |
|
| 179 | + $table->addColumn('mtime', 'datetime', []); |
|
| 180 | + $table->addColumn('ctime', 'datetime', []); |
|
| 181 | + $table->addColumn('editor', 'string', array('length' => 255)); |
|
| 182 | 182 | |
| 183 | - $table->setPrimaryKey( array( 'id' ), 'pk_fosprty_id' ); |
|
| 184 | - $table->addUniqueIndex( array( 'siteid', 'domain', 'code' ), 'unq_fosprty_sid_dom_code' ); |
|
| 185 | - $table->addIndex( array( 'siteid', 'status', 'pos' ), 'idx_fosprty_sid_status_pos' ); |
|
| 186 | - $table->addIndex( array( 'siteid', 'label' ), 'idx_fosprty_sid_label' ); |
|
| 187 | - $table->addIndex( array( 'siteid', 'code' ), 'idx_fosprty_sid_code' ); |
|
| 183 | + $table->setPrimaryKey(array('id'), 'pk_fosprty_id'); |
|
| 184 | + $table->addUniqueIndex(array('siteid', 'domain', 'code'), 'unq_fosprty_sid_dom_code'); |
|
| 185 | + $table->addIndex(array('siteid', 'status', 'pos'), 'idx_fosprty_sid_status_pos'); |
|
| 186 | + $table->addIndex(array('siteid', 'label'), 'idx_fosprty_sid_label'); |
|
| 187 | + $table->addIndex(array('siteid', 'code'), 'idx_fosprty_sid_code'); |
|
| 188 | 188 | |
| 189 | 189 | return $schema; |
| 190 | 190 | }, |
| 191 | 191 | |
| 192 | - 'fos_user_property' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
| 192 | + 'fos_user_property' => function(\Doctrine\DBAL\Schema\Schema $schema) { |
|
| 193 | 193 | |
| 194 | - $table = $schema->createTable( 'fos_user_property' ); |
|
| 194 | + $table = $schema->createTable('fos_user_property'); |
|
| 195 | 195 | |
| 196 | - $table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) ); |
|
| 197 | - $table->addColumn( 'siteid', 'integer', [] ); |
|
| 198 | - $table->addColumn( 'parentid', 'integer', [] ); |
|
| 199 | - $table->addColumn( 'type', 'string', array( 'length' => 32 ) ); |
|
| 200 | - $table->addColumn( 'langid', 'string', array( 'length' => 5, 'notnull' => false ) ); |
|
| 201 | - $table->addColumn( 'value', 'string', array( 'length' => 255 ) ); |
|
| 202 | - $table->addColumn( 'mtime', 'datetime', [] ); |
|
| 203 | - $table->addColumn( 'ctime', 'datetime', [] ); |
|
| 204 | - $table->addColumn( 'editor', 'string', array( 'length' => 255 ) ); |
|
| 196 | + $table->addColumn('id', 'integer', array('autoincrement' => true)); |
|
| 197 | + $table->addColumn('siteid', 'integer', []); |
|
| 198 | + $table->addColumn('parentid', 'integer', []); |
|
| 199 | + $table->addColumn('type', 'string', array('length' => 32)); |
|
| 200 | + $table->addColumn('langid', 'string', array('length' => 5, 'notnull' => false)); |
|
| 201 | + $table->addColumn('value', 'string', array('length' => 255)); |
|
| 202 | + $table->addColumn('mtime', 'datetime', []); |
|
| 203 | + $table->addColumn('ctime', 'datetime', []); |
|
| 204 | + $table->addColumn('editor', 'string', array('length' => 255)); |
|
| 205 | 205 | |
| 206 | - $table->setPrimaryKey( array( 'id' ), 'pk_fospr_id' ); |
|
| 207 | - $table->addUniqueIndex( array( 'parentid', 'siteid', 'type', 'langid', 'value' ), 'unq_fospr_sid_ty_lid_value' ); |
|
| 208 | - $table->addIndex( array( 'parentid' ), 'fk_fospr_pid' ); |
|
| 206 | + $table->setPrimaryKey(array('id'), 'pk_fospr_id'); |
|
| 207 | + $table->addUniqueIndex(array('parentid', 'siteid', 'type', 'langid', 'value'), 'unq_fospr_sid_ty_lid_value'); |
|
| 208 | + $table->addIndex(array('parentid'), 'fk_fospr_pid'); |
|
| 209 | 209 | |
| 210 | - $table->addForeignKeyConstraint( 'fos_user', array( 'parentid' ), array( 'id' ), |
|
| 211 | - array( 'onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE' ), 'fk_fospr_pid' ); |
|
| 210 | + $table->addForeignKeyConstraint('fos_user', array('parentid'), array('id'), |
|
| 211 | + array('onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE'), 'fk_fospr_pid'); |
|
| 212 | 212 | |
| 213 | 213 | return $schema; |
| 214 | 214 | }, |