Coder Social home page Coder Social logo

Comments (4)

amyxzhang avatar amyxzhang commented on September 15, 2024

I've decided the way to fix this is to add db-level uniqueness constraints for a (user,url,type='whitelist/blacklist'). In order to do that, I need to make FilterListItem an abstract class. I think this makes the best sense, since nowhere do we need/want a FilterListItem obj on its own. I have a prototype of the models here: https://github.com/amyxzhang/eyebrowse-server/blob/3-dont-allow-duplicate-wblistitems/api/models.py

Making the data migration itself is not a simple process however, if we want to keep the current data intact. How important is it to keep our current data? if we want to do it, we can using south: http://stackoverflow.com/questions/7108899/using-django-south-to-move-from-concrete-inheritance-to-abstract-inheritance

Thoughts?

from eyebrowse-server.

joshblum avatar joshblum commented on September 15, 2024

I think it’s best to keep the current data set since it allows us to have some data to work with for aggregates and analytics and is also a good set of test data. I’ve never done abstract classes migrations before but shouldn’t South take care of most of the details?

Josh
On Nov 9, 2013, at 2:45 PM, Amy Zhang [email protected] wrote:

I've decided the way to fix this is to add db-level uniqueness constraints for a (user,url,type='whitelist/blacklist'). In order to do that, I need to make FilterListItem an abstract class. I think this makes the best sense, since nowhere do we need/want a FilterListItem obj on its own. I have a prototype of the models here: https://github.com/amyxzhang/eyebrowse-server/blob/3-dont-allow-duplicate-wblistitems/api/models.py

Making the data migration itself is not a simple process however, if we want to keep the current data intact. How important is it to keep our current data? if we want to do it, we can using south: http://stackoverflow.com/questions/7108899/using-django-south-to-move-from-concrete-inheritance-to-abstract-inheritance

Thoughts?


Reply to this email directly or view it on GitHub.

from eyebrowse-server.

amyxzhang avatar amyxzhang commented on September 15, 2024

If I just follow the instructions it should be fine? I'll migrate the abstract change first before doing any of the others. Are you happy with the model change? If so I'm going to go ahead with the migrations one by one. Do we already use south?

from eyebrowse-server.

joshblum avatar joshblum commented on September 15, 2024

We've been using django-evolution, but I’m fine with using South instead. I think the model change is good, can you first duplicate the database and run some tests for the migrations on a local copy?
On Nov 9, 2013, at 5:11 PM, Amy Zhang [email protected] wrote:

If I just follow the instructions it should be fine? I'll migrate the abstract change first before doing any of the others. Are you happy with the model change? If so I'm going to go ahead with the migrations one by one. Do we already use south?


Reply to this email directly or view it on GitHub.

from eyebrowse-server.

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.