versionadded is 0.8
On Dec 6, 2012, at 4:36 PM, junepeach wrote:
> I tested my code, and got below:
>
> Traceback (most recent call last):
> File "/usr/local/bin/alembic", line 9, in <module>
> load_entry_point('alembic==0.4.0', 'console_scripts', 'alembic')()
> File "/usr/local/lib/python2.7/dist-packages/alembic/config.py", line 255,
> in main
> CommandLine(prog=prog).main(argv=argv)
> File "/usr/local/lib/python2.7/dist-packages/alembic/config.py", line 250,
> in main
> self.run_cmd(cfg, options)
> File "/usr/local/lib/python2.7/dist-packages/alembic/config.py", line 241,
> in run_cmd
> **dict((k, getattr(options, k)) for k in kwarg)
> File "/usr/local/lib/python2.7/dist-packages/alembic/command.py", line 97,
> in revision
> script.run_env()
> File "/usr/local/lib/python2.7/dist-packages/alembic/script.py", line 191,
> in run_env
> util.load_python_file(self.dir, 'env.py')
> File "/usr/local/lib/python2.7/dist-packages/alembic/util.py", line 185, in
> load_python_file
> module = imp.load_source(module_id, path, open(path, 'rb'))
> File "alembic/env.py", line 18, in <module>
> from dbmodule import SAINT8
> File "/home/bethesda/Documents/dbmodule/mytables.py", line 35, in <module>
> Column('data', character_type(32)),
> File "/home/bethesda/Documents/dbmodule/mytables.py", line 21, in
> character_type
> VARCHAR(length, collation='utf8_general_ci'), 'mysql'
> TypeError: __init__() got an unexpected keyword argument 'collation'
>
> Did I miss importing a class related with 'collation'? I tried 'from
> sqlalchemy.types import *', and some others, but didn't get it resolved, what
> is wrong?
>
> Thanks,
> jp
>
> On Thursday, December 6, 2012 4:10:01 PM UTC-5, junepeach wrote:
> Thanks, this is nice, I will use it in my code.
>
> On Thursday, December 6, 2012 3:17:25 PM UTC-5, junepeach wrote:
>
> For case insensitive columns:
> MySQL - use utf8_general_ci
> SQLite - use NOCASE collation
>
> ....
>
> Can migration tool handle that for most databases or it should be better done
> in application code?
>
> Thanks and best regards,
>
> --
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/sqlalchemy/-/JvxaQU8BifsJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/sqlalchemy?hl=en.
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.