Comments (11)
Anyway, setting the PYTHONPATH to my current folder, works.
from architect.
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.
Yes, correct.
from architect.
same problem
from architect.
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.
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.
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.
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:
- 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.
- 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.
@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.
@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.
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)
- Postgresql 11 - Trigger for declarative partitioning HOT 1
- syntax error is coming when creating partition of my table HOT 1
- wrong Check constraints
- Missing Contributor License Agreement
- Can I use this library for flask_sqlalchemy? HOT 4
- Examples HOT 3
- Foreign keys to partitioned tables and postgres 12 support
- Still maintained? HOT 2
- How to check if your ORM is supported! (Django + others) HOT 1
- Deleting a field from a table only deletes that field from Parent but not its Child?
- Peewee 3.x HOT 1
- Modern Django not supported HOT 1
- failed when import FieldDoesNotExist from django.db.models.fields HOT 1
- Automatically partition the table with bulk_create() method in Django HOT 1
- architect.exceptions.ORMError: Unsupported ORM "django" requested for class "{MyModel}", available ORMs are: django, peewee, pony, sqlalchemy, sqlobject
- when I want to updated partitioning field occurs error
- Model class app_name.models.MyModel doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS
- What does "architect partition" do to the table?
- Alembic downgrade; single qoutes in postgresql
- Is this maintained? HOT 1
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 architect.