Hi everyone, I have a question
I use Postgresql
Before creating a database, the name is uppercase and lowercase, and there
is no problem.
Later SQLAlchemy was updated to version 1.4
Don't know when the version started,
When creating a database again, use uppercase and lowercase names, which
Mike thank you.
I think,
Use __table_args__ This is the definitive usage.
If you can add a sample to the Sqlalchemy documentation.
Let beginners avoid using the wrong method and confused.
Mike Bayer於 2018年3月19日星期一 UTC+8下午9時27分47秒寫道:
>
> On Mon, Mar 19, 2018 at 12:52 AM, lone oi
and
CheckConstraint(ser > 10 )
is ok.
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/mcve for a full description.
and
UniqueConstraint('foo')
is OK.
No need to place __table_args__
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See
Hi!
i test sqlalchemy 1.1.12 - 1.2.5
create table check constraint.
---
class testTable(db):
__tablename__ = 'testTable'
id = Column(INT, primary_key = True, autoincrement = True, unique =
True)
ser = Column(INT)
CheckConstraint('ser>100')
OK, you code is right.
i am fool.
my project table has own data conn class
subtable and maintable get different session.
so is my bug.
Thank You.
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving
Hello ALL:
i has 2 table.
_Table_Metadata = declarative_base(cls = DictableModel)
class MainTable(_Table_Metadata):
__tablename__ = 'MainTable'
id = Column(BIGINT, primary_key = True, autoincrement = True, unique = True)
number = Column(Text, unique=True, nullable=False)
name