|
Revision 127
(checked in by fumanchu, 6 years ago)
|
Initial implementation of #16 (schema changes). See modeling.html ("Managing Schema Changes") for summary. Oh, and Unit has a new remove_property method.
|
- Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
try: |
|---|
| 3 |
from pyPgSQL import libpq |
|---|
| 4 |
except ImportError: |
|---|
| 5 |
def run(): |
|---|
| 6 |
import warnings |
|---|
| 7 |
warnings.warn("The pyPgSQL.libpq module could not be imported. " |
|---|
| 8 |
"The pyPgSQL test will not be run.") |
|---|
| 9 |
else: |
|---|
| 10 |
user = "postgres" |
|---|
| 11 |
passwd = "" |
|---|
| 12 |
|
|---|
| 13 |
if passwd == "": |
|---|
| 14 |
passwd = raw_input("Enter the password for the PostgreSQL '%s' user:" % user) |
|---|
| 15 |
|
|---|
| 16 |
opts = {u'Connect': ("host=localhost dbname=dejavu_test " |
|---|
| 17 |
"user=%s password=%s" % (user, passwd)), |
|---|
| 18 |
} |
|---|
| 19 |
SM_class = "dejavu.storage.storepypgsql.StorageManagerPgSQL" |
|---|
| 20 |
|
|---|
| 21 |
del user, passwd |
|---|
| 22 |
|
|---|
| 23 |
def run(): |
|---|
| 24 |
import zoo_fixture |
|---|
| 25 |
|
|---|
| 26 |
reload(zoo_fixture) |
|---|
| 27 |
zoo_fixture.init() |
|---|
| 28 |
zoo_fixture.run(SM_class, opts) |
|---|
| 29 |
|
|---|
| 30 |
if __name__ == "__main__": |
|---|
| 31 |
run() |
|---|