Coder Social home page Coder Social logo

Allow for British Postalcodes about publicdb HOT 10 CLOSED

153957 avatar 153957 commented on June 12, 2024
Allow for British Postalcodes

from publicdb.

Comments (10)

153957 avatar 153957 commented on June 12, 2024

While we're at it, also support other postalcodes.
The longest postalcodes used around the world are about 9 characters long.
So if we support up to 11 or 12 characters, we should be safe.

from publicdb.

kaspervd avatar kaspervd commented on June 12, 2024

See commit 8997e23 and ec877d6 at the detector_migration branch of publicdb. I have tested migration 0008 on my local copy of the database but somehow I'm not allowed anymore to go to the django administration to confirm the changes.
Apparently the migration resets my password and my admin rights (this happened also during the test of migration 0007, that time Arne made me admin again).

from publicdb.

153957 avatar 153957 commented on June 12, 2024

Did you set these files up manually, or did you use schemamigration with the --auto flag? http://south.readthedocs.org/en/latest/commands.html#schemamigration

from publicdb.

kaspervd avatar kaspervd commented on June 12, 2024

Manually, by editing
django_publicdb/inforecords/migrations/0006_contactinformation_fix.py

from publicdb.

153957 avatar 153957 commented on June 12, 2024

Can you try via the schemamigration route and see if it gives the same results?

from publicdb.

kaspervd avatar kaspervd commented on June 12, 2024

I've reset the lenghts of the CharFields to 6, 6, 9 and made an initial schemamigration. Then I set the lengths back to 12 and used schemamigration with the --auto flag. This yields the same results (execpt for some comments).
Good to know for future migrations because this is way easier.
Shall I change my version with the one automatically created by schemamigration?

from publicdb.

153957 avatar 153957 commented on June 12, 2024

If it is the same, then there is no reason to change it.
Perhaps add some of the comments if you deem them useful (if the auto generated added more comments..)

from publicdb.

153957 avatar 153957 commented on June 12, 2024

Note to self;
Use this to migrate on server:

./manage.py migrate inforecords

from publicdb.

153957 avatar 153957 commented on June 12, 2024

The migration did not work for me;
_mysql_exceptions.Warning: Data truncated for column 'pobox_postalcode' at row 2

see: ec877d6#commitcomment-3130723

from publicdb.

153957 avatar 153957 commented on June 12, 2024

fixed by 5ffe8a1

from publicdb.

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.