Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
how do others handle SqlAlchemy / etc maintenance in your Pyramid apps ?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jonathan Vanasco  
View profile  
 More options Jan 24, 8:36 pm
From: Jonathan Vanasco <jonat...@findmeon.com>
Date: Thu, 24 Jan 2013 17:36:57 -0800 (PST)
Local: Thurs, Jan 24 2013 8:36 pm
Subject: how do others handle SqlAlchemy / etc maintenance in your Pyramid apps ?
I've had to run a few 'maintenance' routines on one of my apps :
- we changed a few db fields
- we needed to clear the cache
- the functions that created some db field data were updated, so
everything needed to be tested for compliance and possibly regenerated

i couldn't figure out a good way to handle this .
- with an independent script , i'd lose a lot of the functionality
tied to the app/pyramid
- using the commandline / shell for pyramid , i couldn't figure out
how to run everything with a request object ( as many functions are
tied to that )

so i've ended up creating a few views, lock them down, and then turn
them off after I run them.

nothing has caused a timeout, yet, but i'd like a better option.  can
someone point me in the right direction ?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Merickel  
View profile  
 More options Jan 24, 10:40 pm
From: Michael Merickel <mmeri...@gmail.com>
Date: Thu, 24 Jan 2013 21:40:08 -0600
Local: Thurs, Jan 24 2013 10:40 pm
Subject: Re: how do others handle SqlAlchemy / etc maintenance in your Pyramid apps ?

http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/narr/com...

Not sure what else to say here.. your use case is why p.paster.bootstrap
exists.

On Thu, Jan 24, 2013 at 7:36 PM, Jonathan Vanasco <jonat...@findmeon.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andreas Jung  
View profile  
 More options Jan 25, 1:46 am
From: Andreas Jung <li...@zopyx.com>
Date: Fri, 25 Jan 2013 07:46:06 +0100
Local: Fri, Jan 25 2013 1:46 am
Subject: Re: how do others handle SqlAlchemy / etc maintenance in your Pyramid apps ?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I think using "alembic" seems to be the way to go for
upgrading/downgrading database schemas.

- -aj

- --
ZOPYX Limited         | Python | Zope | Plone | MongoDB
Hundskapfklinge 33    | Consulting & Development
D-72074 T�bingen      | Electronic Publishing Solutions
www.zopyx.com         | Scalable Web Solutions
- --------------------------------------------------
Produce & Publish - www.produce-and-publish.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJRAiotAAoJEADcfz7u4AZjBCELwMrDKGl/AMwzQ+JNXpq9z8wb
Ee+2QOZPqszLkgb4vqO0Vh5qV6Yx/T2f+ThRTw1YfxauRbFXo5j8vfyjQOxB9gZo
r2vi4o5xZDGWdeOJ//Z8EiK+agOOuQl57MfCogoAei8aIK9uRabHF4qcshNwjgeL
tbKy1N3+sK4WammXZDhw5jcE/euUqpNQXTuSdj9t7BW9QHtO5HgQ05sIjVQ0kL/n
kP0VicLkGt3H4ozjabnZe9H3KZZzbDrBnXqFBqW0AbsuebW9mVwsMHepx+vVNi7L
XksmEo+XPyJMu+R5bNiu4R47IlUfuL3UZ5STcbnSKKRhFX67KE0M43MdXGhFyVAd
eXH7U7cXdUQr7Kf8gwdRX9Py+xbfkvJxY7scyzVWMwUX2kiauaWorwqMgfS+h4wi
Fb3QyneJZj6XXXMNqyyTzQyiq634BHRWcvdcL/57gWhHyYYwwXKgInq5u93tH/NO
YfGuJAlq+fzjQDw6hbQ65w0GaEE/Js4=
=yBzl
-----END PGP SIGNATURE-----

  lists.vcf
< 1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jonathan Vanasco  
View profile  
 More options Jan 25, 10:28 am
From: Jonathan Vanasco <jonat...@findmeon.com>
Date: Fri, 25 Jan 2013 07:28:52 -0800 (PST)
Local: Fri, Jan 25 2013 10:28 am
Subject: Re: how do others handle SqlAlchemy / etc maintenance in your Pyramid apps ?

On Jan 24, 10:40 pm, Michael Merickel <mmeri...@gmail.com> wrote:

> http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/narr/com...

> Not sure what else to say here.. your use case is why p.paster.bootstrap
> exists.

I had no idea it exists.  It's exactly what I needed.  I missed the
changelog on this 2 years ago!

    from pyramid.paster import bootstrap
    from pyramid.request import Request

    import myapp
    import myapp.lib.handlers
    import myapp.models.core

    class BootstrappedHandler( myapp.lib.handlers._CoreHandler ) :
        def __init__( self , request ):
            self.request = request
            self._setupDbWriter()

    env = bootstrap('MyApp/development.ini')

    bootstrapped = BootstrappedHandler( env['request'] )
    print bootstrapped
    print bootstrapped.request.dbSession.writer

    print
bootstrapped.request.dbSession.writer.query( myapp.models.core.Useraccount ).all()

    env['closer']()


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jonathan Vanasco  
View profile  
 More options Jan 25, 10:32 am
From: Jonathan Vanasco <jonat...@findmeon.com>
Date: Fri, 25 Jan 2013 07:32:34 -0800 (PST)
Local: Fri, Jan 25 2013 10:32 am
Subject: Re: how do others handle SqlAlchemy / etc maintenance in your Pyramid apps ?

On Jan 25, 1:46 am, Andreas Jung <li...@zopyx.com> wrote:

> I think using "alembic" seems to be the way to go for
> upgrading/downgrading database schemas.

It is the best for database schema migrations.

But our maintenance largely has to do with internal functions changing
how/where things are stored.  A few items didn't have the correct
permalink structure , and things like that.  The database isn't
changed, just the data in them ( because we improved something, or
found an edge-case to protect against and fix ).


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »