Yes, I'll try Plan A first(do the INSERT FROM first)
But mainly out of academic curiosity, if I were to start with a blank slate
as you say, I'd still need to import the existing data that is currently in
the non-inheritance table schema? So I guess I would just drop the
database, upgrade to
Oh right, I've used the @property decorator before, just been a while.
Thanks for the explanation of @hybrid_property. Makes sense.
On Wed, Jun 7, 2017 at 5:32 PM, mike bayer wrote:
>
>
> On 06/07/2017 06:19 PM, Greg Silverman wrote:
>
>> Thanks, it worked!
>>
>> I
Thanks for the insight Mike. I guess the best way to go about that would be
to just call the raw insert sql statemen in the migration? like in
https://stackoverflow.com/questions/23206562/sqlalchemy-executing-raw-sql-with-parameter-bindings/23206636#23206636
Since this app is not in production
On 06/07/2017 06:19 PM, Greg Silverman wrote:
Thanks, it worked!
I tried something similar using the @hybrid_property decorator, but
could not get it to work. What exactly is the difference between that
and the @property decorator?
@property is super normal Python stuff that's in all the
Thanks, it worked!
I tried something similar using the @hybrid_property decorator, but could
not get it to work. What exactly is the difference between that and the
@property decorator?
Greg--
On Wed, Jun 7, 2017 at 5:08 PM, mike bayer wrote:
>
>
> On 06/07/2017
On 06/07/2017 04:44 PM, Michael wrote:
Hi all, I have a class called MediaChapter(Base), which I've refactored
into MediaBase(Base) and MediaChapter(MediaBase) When I run the
migration, I see:
|
psycopg2.IntegrityError:insert orupdate on table "mediachapter"violates
foreign key constraint
On 06/07/2017 02:31 PM, GMS wrote:
I am sure this is easier than I am making it, but I just want to add a
property to a class so that decimal representations get truncated at 3
decimal digits.
My class is this:
class Measures(Model):
__tablename__= 'xcelera_measures'
id=
Hi,
Thanks for pointing that out. It's still throwing the same error, even when
changed. Does not seem to like passing the column name to the
column_property method.
Greg--
On Wed, Jun 7, 2017 at 3:30 PM, Jonathan Vanasco
wrote:
> These are two different lines of code.
Hi all, I have a class called MediaChapter(Base), which I've refactored
into MediaBase(Base) and MediaChapter(MediaBase) When I run the migration,
I see:
psycopg2.IntegrityError: insert or update on table "mediachapter" violates
foreign key constraint "fk_mediachapter_id_mediabase"
DETAIL:
These are two different lines of code. The second one looks correct.
> value_new = column_property("%.3f" % value())
> value_new = column_property("%.3f" % value)
>
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please
I am sure this is easier than I am making it, but I just want to add a
property to a class so that decimal representations get truncated at 3
decimal digits.
My class is this:
class Measures(Model):
__tablename__ = 'xcelera_measures'
id = Column(Numeric, primary_key=True)
studyidk
11 matches
Mail list logo