On 21/02/2015 9:55 AM, talex wrote:
> Thanks for your helpful comments.
>
> Andrew, thanks for your migration article at
http://afrg.co/updj17/a2 .
> It is slightly daunting for me at this point, but I may need to come
> back to it later. Your book looks interesting.
>
> Mike, thanks for the dump/load load suggestion.
>
> For the moment, I think the easiest thing for me is to follow Thomas,
> and just start over with Postgres, but let me explain more about what I
> am doing and ask two more questions.
>
> I am leading a project to create a web application for uploading certain
> scientific data into a database. No one in the group has experience
> with web development. We decided on Django, and I wrote a prototype
> using sqlite3. Sqlite3 will not be used going forward. Instead either
> Postgres or MySql will be used. Personally I am in favor of Postgres,
Good call. IMO.
> but I have been telling the group, perhaps incorrectly, that Django is
> "database agnostic"
Correctly.
https://docs.djangoproject.com/en/1.7/ref/databases/
and that we can easily change databases at any time
> in the future should we need to do so. So let me ask two more questions:
>
> In the life of a Django application, is it simple and easy to change the
> database flavor (say from Postgres to MySql), even after significant
> data has accumulated in the model's database?
Probably easy but depends on your data. You need to do a comparison of
data types supported to see if your task is covered by both. But even if
not, you should be able to work around it with sleight of hand. This is
independent of Django.
>
> Does the answer change if we are willing to forgo the use of the
> version-control-like capabilities represented by Django's
> makemirations/migrate tools?
Not sure I understand the question. Switching from one database to
another is not migrating in the sense that word is used in Django.
You probably wouldn't even need to use migrations anyway unless your
models change. And you wouldn't want to conflate a model change with a
database switch.
You would use PG Admin for "dumbing down" Postgres data types so it will
become dump/loadable into Mysql.
Your real alternatives in switching databases are to do it with a
shutdown or do it live. Django can handle multiple databases
simultaneously so your options are legion!
I think the only valid reason for switching databases is if the one you
chose is not doing the job.
Maybe your team is familiar with Mysql. If so, go with that. It is
usually better for a leader to ask the team to do the research then
choose the stack so that they have buy-in.
Cheers
Mike
>
> Thanks.
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
django-users...@googlegroups.com
> <mailto:
django-users...@googlegroups.com>.
> <mailto:
django...@googlegroups.com>.
> <
https://groups.google.com/d/msgid/django-users/458baa37-5387-4784-97c2-c7cbb50fc480%40googlegroups.com?utm_medium=email&utm_source=footer>.