Coder Social home page Coder Social logo

Comments (11)

faxioman avatar faxioman commented on June 7, 2024

Anyway, setting the PYTHONPATH to my current folder, works.

from architect.

maxtepkeev avatar maxtepkeev commented on June 7, 2024

Hi!

If I understood you correctly, architect was unable to find your models and you managed to get it working after modifying PYTHONPATH, right ?

from architect.

faxioman avatar faxioman commented on June 7, 2024

Yes, correct.

from architect.

nickspring avatar nickspring commented on June 7, 2024

same problem

from architect.

budlight avatar budlight commented on June 7, 2024

I had this same problem, also might need a documentation warning for django users that you can't use foreign keys like

user = models.ForeignKey(
        'account.Account', blank=True, null=True,
        on_delete=models.SET_NULL)

instead use:

from account.models import Account
user = models.ForeignKey(
        Account, blank=True, null=True,
        on_delete=models.SET_NULL)

from architect.

maxtepkeev avatar maxtepkeev commented on June 7, 2024

Initializing problem with Django will be fixed in the next version, thank you all guys for reporting this.

@budlight
Working with foreign keys currently is not implemented in the way it should be. This is a work in progress and will be released as soon as it is finished. There are also a lot more stuff to do to make the library fully compatible and correctly working with all the database features. I'm considering to create a FAQ, TODO and so on, to make it more transparent and understandable for other users and contributors to understand what's going on and what needs to be implemented.

Anyway I highly appreciate any reports about all the problems you have or any other suggestions.

from architect.

budlight avatar budlight commented on June 7, 2024

I don't have your test suite setup not sure all the ins and outs of it but something like
add in

from django.db import transaction

then

    def test_range_atomic(self):
        with transaction.atomic():
            object1 = RangeDateYear.objects.create(name='foo', created=datetime.datetime(2014, 4, 15, 18, 44, 23))
        object2 = RangeDateYear.objects.raw('SELECT * FROM test_rangedateyear_y2014 WHERE id = %s', [object1.id])[0]

        self.assertTrue(object1.name, object2.name)

should trigger an exception, not the best test, but like I said haven't tried out your test suite

from architect.

gotlium avatar gotlium commented on June 7, 2024
ALTER TABLE dbmail_maillog PARTITION BY RANGE (TO_DAYS(created))(
            PARTITION dbmail_maillog_y2014m12 VALUES LESS THAN (0)
);

MSG: Cannot delete or update a parent row: a foreign key constraint fails

MySQL does not support foreign keys on partitioned tables.

Foreign keys not supported for partitioned InnoDB tables. Partitioned tables using the InnoDB storage engine do not support foreign keys. More specifically, this means that the following two statements are true:

  1. No definition of an InnoDB table employing user-defined partitioning may contain foreign key references; no InnoDB table whose definition contains foreign key references may be partitioned.
  2. No InnoDB table definition may contain a foreign key reference to a user-partitioned table; no InnoDB table with user-defined partitioning may contain columns referenced by foreign keys.

from architect.

pajooh avatar pajooh commented on June 7, 2024

@maxtepkeev could you tag a new version (0.2.1?) containing the fix of this bug please?
where using pip, it's better to tag frequently to keep everyone up to date

from architect.

maxtepkeev avatar maxtepkeev commented on June 7, 2024

@pajooh Yeah, I know. The problem is that there are several other important bugs that should be fixed before the next release will be possible. I didn't have a time for this project until now, now I'm in the process of rewriting some parts of it and fixing the bugs, so expect a new release in the next few weeks.

from architect.

maxtepkeev avatar maxtepkeev commented on June 7, 2024

Fixed in v0.3.0. Please see docs, because Architect was almost completely rewritten.

@gotlium I didn't completely get what your comment was about. If it is still relevant, please open a new issue with detailed description of the problem.

from architect.

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.