Comments (3)
Thanks @thbighead for posting the issue!
Suggested Improvement to Laravel
Yeah, this could be solved by Laravel allowing us to specify a prefix length for the string indexes.
Reading through the issues posted on the Laravel repository...
Link to GitHub issue: Ability to define index key length while creating schema
It seems like that is being discussed, but no idea when they will get it implemented.
Solution
So for our purposes, I have added some logic around the creation of the two troubled indexes in the migrations.
For example: Link to relevant code: Alternate Names Table Migration
The index will only be created, if the database driver is 'mysql' and it doesn't have an environment variable set indicating that its being run as part of a continuous integration service.
I am using travis-ci.org and it was throwing an error about the syntax I was using. Since these indexes aren't needed as part of the unit tests, I am not creating them under those circumstances.
Regarding indexes you might not need
It was suggested that I could just not create the indexes at all. Some people just won't need them. A fair point. But I need them. ;)
So it would be just as easy to suggest that each user can decide for themselves what indexes they want to delete and which they want to keep. (...as long as creating them doesn't throw an exception :) )
from geonames.
Same issue, solved migration by commenting :
and
from geonames.
Open file config/database.php and change the strict mode to false under 'mysql'.
https://i.imgur.com/ezinPdn.png
from geonames.
Related Issues (20)
- Will not install on laravel 6.4 HOT 2
- Error when running route:cache HOT 3
- Laravel 7 support ? HOT 4
- primaryKey issue HOT 1
- Laravel 7 not supporting HOT 3
- Foreign keys HOT 3
- Feature request - Countryinfo table HOT 1
- geonames:install doesn't pass through database connection to all subsequent calls HOT 2
- Very minor: typo in directory name `src\Oberservers`
- PHP requirement mismatch with Laravel HOT 1
- Problems with backslash (Windows, DIRECTORY_SEPARATOR) HOT 6
- Geonames updates - Alternate names ? HOT 6
- Invalid utf8 character string HOT 2
- Misuse of env HOT 1
- PHP 8 support ? HOT 3
- Zipcodes
- laravel 9 HOT 4
- Question - Is it possible to add countries without deleting existing ones ?
- Laravel version 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geonames.