Changes between Initial Version and Version 1 of Ticket #27061, comment 2


Ignore:
Timestamp:
Aug 14, 2016, 10:57:57 AM (8 years ago)
Author:
Chris Jerdonek

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27061, comment 2

    initial v1  
    33There's no need for me to change the PostgreSQL installation or change the template encoding because I'm able to run the following CREATE statement in my environment setup:
    44
    5 {{{
     5{{{#!sql
    66CREATE DATABASE <name> WITH TEMPLATE template0 ENCODING 'UTF8'
    77}}}
     
    1111If Django could clone a test database from an existing database, that would be another option.  It already has syntax like the following in postgresql's `_clone_test_db()` to clone a test database from another test database (from [https://github.com/django/django/blob/d7e0cf04b77c859d895e81ddb7af06a2ccfda5a7/django/db/backends/postgresql/creation.py#L26 here]:
    1212
    13 {{{
     13{{{#!python
    1414cursor.execute("CREATE DATABASE %s WITH TEMPLATE %s" % (
    1515    qn(target_database_name), qn(source_database_name)))
Back to Top