migration - Making models automatically in django? -


could please tell me there method create , migrate models automatically in django. let me explain in brief:

class device1_data(models.model):     created_at = models.charfield(max_length=30, null=true)      longitude = models.charfield(max_length=20, null=true)     latitude = models.charfield(max_length=20, null=true) 

similary wish same model should create device2_data. , again migrations taken place automatically. there should not necessity of running python manage.py makemigrations.

is possible guys??

from comments sounds related performance concern putting data single table. describing sounds attempt @ sharding (or horizontal partitioning) single table device. see https://en.wikipedia.org/wiki/shard_(database_architecture)

horizontal partitioning database design principle whereby rows of database table held separately, rather being split columns (which normalization , vertical partitioning do, differing extents). each partition forms part of shard, may in turn located on separate database server or physical location.

for django related solutions problem might consider using django-horizon or django-sharding. architect enhancement django orm supports partitions more describing.

table partitioning division of 1 table several tables, called partitions, still represent original table.


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -