Giter Club home page Giter Club logo

Comments (3)

michaeldrennen avatar michaeldrennen commented on June 27, 2024 1

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.

spout avatar spout commented on June 27, 2024

Same issue, solved migration by commenting :


and

from geonames.

librafiredev avatar librafiredev commented on June 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.