We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sessions
When running artisan doctrine:migrations:diff it's always creates migration that contains changes to sessions table.
artisan doctrine:migrations:diff
Running artisan doctrine:migrations:diff creates migration that contains SQL code below
The up addSql will look like
addSql
ALTER TABLE sessions CHANGE id id VARCHAR(255) NOT NULL
The down addSql will look like
ALTER TABLE sessions CHANGE id id VARCHAR(255) NOT NULL COLLATE utf8mb4_unicode_ci
SESSION_DRIVER=database
.env
artisan session:table
artisan migrations:migrate
xml
artisan doctrine:mapping:import --namespace=Your\\Namespace\\ xml Your/Mappings/Folder
My current xml for sessions table is
<?xml version="1.0" encoding="utf-8"?> <doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> <entity name="Foo\Bar\Session" table="sessions" repository-class="Foo\Bar\SessionRepository" > <unique-constraints> <unique-constraint name="sessions_id_unique" columns="id"/> </unique-constraints> <id name="id" type="string" column="id" length="255"> <generator strategy="IDENTITY"/> </id> <field name="ipAddress" type="string" column="ip_address" length="45" nullable="true"> <options> <option name="fixed"/> </options> </field> <field name="userAgent" type="text" column="user_agent" length="65535" nullable="true"> <options> <option name="fixed"/> </options> </field> <field name="payload" type="text" column="payload" length="65535" nullable="false"> <options> <option name="fixed"/> </options> </field> <field name="lastActivity" type="integer" column="last_activity" nullable="false"> <options> <option name="unsigned"/> </options> </field> <many-to-one field="user" target-entity="App\Doctrine\Entity\User" inversed-by="sessions" fetch="LAZY"> <join-columns> <join-column name="user_id" referenced-column-name="id"/> </join-columns> </many-to-one> </entity> </doctrine-mapping>
My doctrine.php (showing only changes because it's almost similar) is
doctrine.php
'managers' => [ 'default' => [ 'dev' => env('APP_DEBUG', false), 'meta' => env('DOCTRINE_METADATA', 'xml'), 'connection' => env('DB_CONNECTION', 'mysql'), 'namespaces' => [], 'paths' => [ base_path('Your/Mappings/Folder') ], ] ],
Running artisan doctrine:migrations:diff gives error with message No changes detected in your mapping information. Like on screenshot
No changes detected in your mapping information.
The text was updated successfully, but these errors were encountered:
Perhaps it's better to ask this at doctrine/migrations? I'm not sure what's causing it
Sorry, something went wrong.
No branches or pull requests
Bug Report
Summary
When running
artisan doctrine:migrations:diff
it's always creates migration that contains changes tosessions
table.Current behavior
Running
artisan doctrine:migrations:diff
creates migration that contains SQL code belowThe up
addSql
will look likeThe down
addSql
will look likeHow to reproduce
SESSION_DRIVER=database
to.env
artisan session:table
artisan migrations:migrate
xml
mappings)artisan doctrine:mapping:import --namespace=Your\\Namespace\\ xml Your/Mappings/Folder
artisan doctrine:migrations:diff
. It will create migration with session table changes.My current
xml
for sessions table isMy
doctrine.php
(showing only changes because it's almost similar) isExpected behavior
Running
![image](https://user-images.githubusercontent.com/17382248/42421241-0575b9ce-82db-11e8-9d3f-13410bf30a11.png)
artisan doctrine:migrations:diff
gives error with messageNo changes detected in your mapping information.
Like on screenshotThe text was updated successfully, but these errors were encountered: