示例#1
0
from gareth53.apps.dmigrations.mysql import migrations as m
migration = m.InsertRows(table_name='django_site',
                         columns=[u'id', u'domain', u'name'],
                         insert_rows=((
                             1L,
                             u'www.gareth53.co.uk',
                             u'Gareth53.co.uk',
                         ), ),
                         delete_ids=[1])
示例#2
0
from gareth53.apps.dmigrations.mysql import migrations as m
import datetime
migration = m.InsertRows(
    table_name='navigation_navigationlink',
    columns=[u'id', u'text', u'link', u'rank'],
    insert_rows=((1L, u'More RSS Feeds', u'/rss-feeds.html', 20L),
                 (2L, u'Home', u'/', 2L), (3L, u'Podcast', u'/podcast/', 5L),
                 (4L, u'Blog', u'/blog/', 5L), (5L, u'About Me',
                                                u'/about-me.html', 15L),
                 (6L, u'About This Site', u'/about-this-site.html', 17L),
                 (7L, u'Podcasting Help', u'/podcast/podcasting-help.html',
                  35L), (8L, u'Contact Me', u'/contact-me.html',
                         18L), (9L, u'About Us',
                                u'/podcast/about-nick-and-gareth.html', 16L),
                 (10L, u'Home', u'/podcast/',
                  2L), (11L, u'Podcast feed', u'/podcast/podcast-feed.xml',
                        45L), (12L, u'Blog feed', u'/blog/rss/posts.xml', 1L)),
    delete_ids=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])
from gareth53.apps.dmigrations.mysql import migrations as m
import datetime
migration = m.InsertRows(
    table_name='podcast_episode',
    columns=[
        u'id', u'title', u'subtitle', u'cover_image', u'episode_number',
        u'season_number', u'description', u'media_URL', u'primary_keywords',
        u'secondary_keywords', u'author_name', u'author_email', u'body_html',
        u'notes_and_errata', u'pub_date', u'enable_comments', u'slug',
        u'status', u'author_id', u'image_description', u'enhanced_media_URL'
    ],
    insert_rows=
    ((1L, u'Drugs', u'In which we discuss tracks with a narcotic theme',
      u'img/podcast/covers/gareth-and-nick008_.jpg', 8L, 1L,
      u'In which we discuss songs with a narcotic theme',
      u'http://www.gareth53.co.uk/podcast/mp3/peters-and-senior-episode8-drugs.mp3',
      u'',
      u"<p>Drugs, Mark Linkous, Mark Arm, The Telescopes,High On Fire, Damon Albarn, Sting, Paul Simon, britpop, Oasis, Champagne Supernova, Be Here Now, Apocalypse Now, Noel Gallagher, Liam Gallagher, Jarvis Cocker, Pulp, This Is Hardcore, Steve Albini, Alternative Tentacles, Maximum Rock n Roll, Heroin, Prostitutes, Pornography, Germany, Nitzer Ebb, The Fuzztones, David Gedge, Seamonsters, Columbian Necktie, Ergot, Rapeman, Political Correctness Gone Mad, F****d Up, F**k Buttons, Selfish C**t, Parkinson's Disease, Sleepers, Robert De Niro, Dr Oliver Sachs, Atomizer, The Sound Of Impact, Pig Pile, Shellac, The Adult Net, Brix Smith, The Fall, Nuggets box set, Greg Munford, Psychedelia, Mr Pharmacist, The Other Half, The Horrors, Haight-Ashbury, The Monkees, CBS, Jack Nicholson, Head, Boyce And Heart, Goffin And King, The Porpoise Song, The Locomotion, Pink Floyd, Syd Barrett, Umma Gumma, Dark Side Of The Moon, Cold Turkey, Huddersfield, spliff, hippies, posh students, reefer, blow back, hot rocks, stoned, fags, Mark Owen, Bring It On, Mercury Prize, John Lee Hooker, Liquid Skin, Hut, Virgin, The States, Australia, ATO Records, Crack, Hallucinogens, Mushrooms, The Third Summer Of Love, Muse, Devon, Super Furry Animals, Short Term Memory Loss, Junkie, Habit, Doses, Medicine, Jon Brion, In A Basement Over The Hill, The Windmill Brixton, Hoffman, The King Will Build A Disco, Track And Field, Walking Back To Jesus Parts I &amp; III, Neutral Milk Hotel, Balls, Welcome Home Loser, Jeff Mangum, Olivia Tremor Control, Elephant 6 Holiday Surprise Tour, Engine, First Annual Jeff Mangum Day, Facebook, Rose Wallace Goldaline, The Naked Lunch, William Borroughs, Interzone, Men At Work, Agent Cooper, Twin Peaks, Led Zeppelin, Abbey Road, Jane's Addiction, Justin Warfield, One Inch Punch, She Wants Revenge, Mugwump Jism, Limp Bizkit, De La Soul, Teenage Fanclub, Fugazi Glueman, The Secret Machines Alone Jealous And Stoned, Jesus And Mary Chain, Stoned And Dethroned.</p>",
      u'Gareth Senior', u'*****@*****.**',
      u"<p>Two blokes discuss Big Black, The Strawberry Alarm Clock, The Broken Family Band, Elliott Smith, Gomez, and Bomb The Bass. All linked together by a narcotic theme.</p>\r\n<p>Your comments are welcome - so email us with those. And we'll see you next time.</p>",
      u'<p>The cover art is photoshopped from the cover of Everything But The Girl\'s "Walking Wounded" release.</p>\r\n<p>The Britpop documentary is probably John Dower\'s 2003 documentary Live Forever. <a href="http://napalmbutt.googlepages.com/tourdiary.html" target="_blank">The Steve Albini tour diary</a> first appeared in Forced Exposure issue 13.</p>\r\n<p><a href="http://tinyurl.com/albini" target="_blank">The online poker forum</a> where Steve Albini answers questions.</p>\r\n<p>The Dr Oliver Sacks book / De Niro film is Awakenings rather than Sleepers.</p>\r\n<p>Shellac is Steve Albini\'s current band.</p>\r\n<p>John Carter wrote \'Incense &amp; Peppermints\'.</p>\r\n<p>Goffin and King\'s wrote the Loco-motion (1962) before Porpoise Song (1968).</p>\r\n<p>The third \'Summer of Love\' was in 2004.</p>\r\n<p>YouTube hosts <a href="http://uk.youtube.com/watch?v=RxKMPTR0MVA" target="_blank">the Kerry Katona \'car-crash\' interview</a> we mentioned.</p>\r\n<p>Because he "just wants to dance in your tangles" is a reference to the Neutral Milk Hotel  song \'Gardenhead / Leave Me Alone\'.</p>',
      datetime.datetime(2008, 10, 16, 11, 53, 12), 1, u'drugs', 1L, 1L,
      u'A pastiche of Everything But The Girl',
      u'http://www.gareth53.co.uk/podcast/mp3/peters-and-senior-episode8-drugs.m4a'
      ),
     (2L, u'The Pilot Episode',
      u"OK, let's see if this is fun and if it will work...",
      u'img/podcast/covers/gareth-and-nick001.jpg', 1L, 1L,
      u'Testing, testing, one, two, one, two',
      u'http://www.gareth53.co.uk/podcast/mp3/howboutthembears-peters-and-senior-episode1-pilot.mp3',
      u'',
from gareth53.apps.dmigrations.mysql import migrations as m
import datetime

migration = m.InsertRows(
    table_name='podcast_track',
    columns=[
        u'id', u'track_title', u'album_id', u'artist_id', u'track_number',
        u'track_year'
    ],
    insert_rows=((1L, u'The Mardi Gras Rescue Mission', 4L, 5L, 5L,
                  u''), (2L, u'Bug Powder Dust', 5L, 3L, 6L,
                         u''), (3L, u'Ruff Stuff', 3L, 4L, 3L,
                                u''), (4L, u'L Dopa', 1L, 1L, 1L, u''),
                 (5L, u'Incense And Peppermints', None, 6L, 2L,
                  u''), (6L, u'Junk Bond Trader', 2L, 2L, 4L,
                         u''), (7L, u'Hazy Lazy Hologram', 9L, 57L, 6L,
                                u'1991'), (8L, u'White', None, 31L, 2L, u''),
                 (9L, u'Holiday Surprise 1-2-3', 7L, 30L, 3L,
                  u''), (10L, u'Race For The Prize', 6L, 56L, 1L,
                         u'1999'), (11L, u'Nadine', 8L, 29L, 6L, u''),
                 (12L, u'Worlds Away', 10L, 58L, 5L,
                  u'1999'), (13L, u'The Altar Boys', 11L, 44L, 1L, u'1993'),
                 (14L, u'Hard As A Stone', 12L, 45L, 2L,
                  u'2001'), (15L, u'Another Lonely Night', 13L, 46L, 2L,
                             u'1993'), (16L, u"Ain't Too Proud To Bow", 14L,
                                        49L, 4L, u'2000'),
                 (17L, u'What May Be The Oldest', 15L, 48L, 5L,
                  u'2002'), (18L, u'Skall Du Mango Hed? Naa!', 16L, 47L, 6L,
                             u'2001'), (19L, u'Six Months In A Leaky Boat',
                                        22L, 52L, 6L,
                                        u''), (20L, u'TV Party', 21L, 54L, 5L,
from gareth53.apps.dmigrations.mysql import migrations as m
import datetime
migration = m.InsertRows(
    table_name = 'auth_user',
    columns = [u'id', u'username', u'first_name', u'last_name', u'email', u'password', u'is_staff', u'is_active', u'is_superuser', u'last_login', u'date_joined'],
    insert_rows = ((1L,
  u'garethsenior',
  u'Gareth',
  u'Senior',
  u'*****@*****.**',
  u'sha1$19bed$7953b0a10489cdd0711d16776c0bf7b2d8e67667',
  1,
  1,
  1,
  datetime.datetime(2009, 1, 19, 19, 48, 41),
  datetime.datetime(2009, 1, 19, 19, 28, 49)),),
    delete_ids = [1]
)
from gareth53.apps.dmigrations.mysql import migrations as m
import datetime
migration = m.InsertRows(
    table_name='navigation_navigation',
    columns=[u'id', u'name', u'description'],
    insert_rows=((1L, u'main', u'the main navigation for the core site'),
                 (2L, u'footer', u'footer links for the core site'),
                 (3L, u'podcast-main',
                  u'Main navigation for the podcast section'),
                 (4L, u'podcast-footer',
                  u'footer navigation for the podcast pages')),
    delete_ids=[1, 2, 3, 4])
示例#7
0
from gareth53.apps.dmigrations.mysql import migrations as m
import datetime

migration = m.InsertRows(
    table_name='podcast_artist',
    columns=[u'id', u'name', u'official_URL', u'wikipedia_URL', u'slug'],
    insert_rows=(
        (1L, u'Big Black', u'', u'http://en.wikipedia.org/wiki/Big_Black',
         u'big-black'), (2L, u'Elliott Smith', u'',
                         u'http://en.wikipedia.org/wiki/Elliott_smith',
                         u'elliott-smith'),
        (3L, u'Bomb The Bass', u'',
         u'http://en.wikipedia.org/wiki/Bomb_The_Bass', u'bomb-bass'),
        (4L, u'Gomez', u'', u'http://en.wikipedia.org/wiki/Gomez_(band)',
         u'gomez'), (5L, u'The Broken Family Band',
                     u'http://www.thebrokenfamilyband.com/', u'',
                     u'broken-family-band'),
        (6L, u'The Strawberry Alarm Clock', u'',
         u'http://en.wikipedia.org/wiki/The_Strawberry_Alarm_Clock',
         u'strawberry-alarm-clock'),
        (7L, u'Curtis Mayfield', u'',
         u'http://en.wikipedia.org/wiki/Curtis_Mayfield', u'curtis-mayfield'),
        (8L, u'My Bloody Valentine', u'',
         u'http://en.wikipedia.org/wiki/My_Bloody_Valentine_(band)',
         u'my-bloody-valentine'),
        (9L, u'A Tribe Called Quest', u'',
         u'http://en.wikipedia.org/wiki/A_tribe_called_quest',
         u'tribe-called-quest'),
        (10L, u'St. Etienne', u'',
         u'http://en.wikipedia.org/wiki/Saint_Etienne_(band)',
         u'st-etienne'), (11L, u'Adorable', u'',
示例#8
0
from gareth53.apps.dmigrations.mysql import migrations as m
import datetime
migration = m.InsertRows(
    table_name='articles_article',
    columns=[
        u'id', u'title', u'slug', u'body_html', u'pub_date', u'status',
        u'category_id', u'pod_promos_id'
    ],
    insert_rows=
    ((1L, u'RSS Feeds', u'rss-feeds',
      u'<h2>Main Feeds</h2>\r\n<p>There\'s the vanilla RSS feeds for the blog and for the podcast</p>\r\n<ul>\r\n<li><a href="http://www.gareth53.co.uk/blog/posts.xml" target="_blank">Blog RSS feed</a></li>\r\n<li><a href="http://www.gareth53.co.uk/podcast/podcast-feed.xml" target="_blank">Podcast RSS feed</a></li>\r\n</ul>\r\n<p>You can also subscribe to blog posts on a per category basis. So, if you\'re interested in film reviews but not all that javascript, Django and HTML malarky, well, feel free to do so.</p>\r\n<h2>Blog Category Feeds</h2>\r\n<ul>\r\n<li><a href="http://www.gareth53.co.uk/blog/category/development.xml" target="_blank">\'development\'</a></li>\r\n<li><a href="http://www.gareth53.co.uk/blog/category/design.xml" target="_blank">\'design\'</a></li>\r\n<li><a href="http://www.gareth53.co.uk/blog/category/tellybox.xml" target="_blank">\'tellybox\'</a></li>\r\n<li><a href="http://www.gareth53.co.uk/blog/category/football.xml" target="_blank">\'football\'</a></li>\r\n<li><a href="http://www.gareth53.co.uk/blog/category/rant.xml" target="_blank">\'rant\'</a></li>\r\n<li><a href="http://www.gareth53.co.uk/blog/category/film.xml" target="_blank">\'film\'</a></li>\r\n<li><a href="http://www.gareth53.co.uk/blog/category/personal.xml" target="_blank">\'personal\'</a></li>\r\n<li><a href="http://www.gareth53.co.uk/blog/category/music.xml" target="_blank">\'music\'</a></li>\r\n<li><a href="http://www.gareth53.co.uk/blog/category/radio.xml" target="_blank">\'radio\'</a></li>\r\n<li><a href="http://www.gareth53.co.uk/blog/category/podcast.xml" target="_blank">\'podcast\'</a></li>\r\n</ul>\r\n<h2>RSS Help</h2>\r\n<p>If you don\'t know what this mysterious \'RSS\' is - it\'s an acronym for "Really Simple Syndication". There\'s an introduction to what it is, what it does and how to use it below.</p>\r\n<ul>\r\n<li><a href="http://en.wikipedia.org/wiki/RSS_(file_format)" target="_blank">Wikipedia definition of RSS</a></li>\r\n<li><a href="http://news.bbc.co.uk/sport1/hi/help/rss/default.stm" target="_blank">Help pages on bbc.co.uk Sport section</a></li>\r\n</ul>',
      datetime.datetime(2009, 1, 19, 22, 47, 38), 1L, 3L, 1L),
     (2L, u'Podcasting Help', u'podcasting-help',
      u'<p>The word "podcasting" is a portmanteau of "ipod" and "broadcasting".</p>\r\n<p>Podcasts are like radio programmes but on the interweb. Subscribe to a podcast adn a new episode will be downloaded when it\'s published.</p>\r\n<p>Although podcasts are like radio, it\'s incredibly important they shouldn\'t feature as high production values as radio programmes, they shouldn\'t be slick, they shouldn\'t feature adverts or professional DJs or voice artists. That\'s cheating. Also, if a podcast appears to have been made by chopping up the best pieces of a proper radio show, well that\'s a serious offence and baby jesus will, somewhere, be shedding a single, opaque tear.</p>\r\n<p>As you can see, it\'s complicated (and, although I shouldn\'t be telling you this... it involves copious use of smoke, mirrors, secret trapdoors and twins).</p>\r\n<p>Most people refer to the iTunes for their podcasting needs. But you can use other software (<a href="http://juicereceiver.sourceforge.net" target="_blank">Juice</a> is a good one).</p>\r\n<p>You\'ll need the feed to subscribe to the podcast: <a href="http://www.gareth53.co.uk/podcast/podcast-feed.xml" target="_blank">here it is</a>.</p>\r\n<p>If you need more sensible help, try these:</p>\r\n<ul>\r\n<li><a href="http://www.bbc.co.uk/radio/help/faq/what_is_a_podcast.shtml" target="_blank">BBC Radio\'s Podcasting FAQ</a></li>\r\n</ul>\r\n<p>&nbsp;</p>',
      datetime.datetime(2009, 1, 20, 13, 24, 44), 1L, 1L, 5L),
     (3L, u'About Me', u'about-me',
      u'<p>Hi. I\'m Gareth Senior. I live and work in London although I\'m originally from West Yorkshire.</p>\r\n<p>I\'ve lived in North London since February 2000, during that time I\'ve worked as a designer / web developer for Capital Radio Group, GCap Media plc, BBC Worldwide, EMAP Automotive and Global Radio.</p>\r\n<p>Sites I\'ve worked on:</p>\r\n<ul>\r\n<li><a href="http://www.xfm.co.uk" target="_blank">Xfm</a></li>\r\n<a href="http://www.xfm.co.uk" target="_blank"> </a>\r\n<li><a href="http://www.capitalradio.co.uk" target="_blank">Capital Radio</a></li>\r\n<a href="http://www.capitalradio.co.uk" target="_blank"> </a>\r\n<li><a href="http://www.topgear.com" target="_blank">Top Gear</a></li>\r\n<a href="http://www.topgear.com" target="_blank"> </a>\r\n<li><a href="http://www.radiotimes.com" target="_blank">Radio Times</a></li>\r\n<li><a href="http://www.classicfm.co.uk" target="_blank">Classic FM</a></li>\r\n<li><a href="http://www.bbcgoodfood.com" target="_blank">Good Food Magazine</a></li>\r\n<li><a href="http://www.bbcgardenersworld.com" target="_blank">Gardener\'s World</a></li>\r\n<li><a href="http://www.hit40uk.com" target="_blank">Hit40UK</a></li>\r\n<li><a href="http://www.bbcgirltalk.com" target="_blank">Girl Talk Magazine</a></li>\r\n<li><a href="http://www.maxpower.co.uk" target="_blank">Max Power</a></li>\r\n<li><a href="http://www.lro.com" target="_blank">Land Rover Owner</a></li>\r\n<li><a href="http://www.thebrokenfamilyband.com" target="_blank">The Broken Family Band</a></li>\r\n</ul>\r\n<h2>Elsewhere On The Internets</h2>\r\n<p>You can find me in the following places:</p>\r\n<ul>\r\n<li><a href="http://www.flickr.com/photos/gareth53/" target="_blank">Flickr</a></li>\r\n<li><a href="http://twitter.com/gareth53" target="_blank">Twitter</a></li>\r\n<li><a href="http://www.last.fm/user/gareth53" target="_blank">Last.fm</a></li>\r\n<li><a href="http://www.facebook.com" target="_blank">Facebook</a></li>\r\n<li><a href="http://www.linkedin.com/in/garethsenior" target="_blank">linkedIn</a></li>\r\n<li><a href="http://delicious.com/gareth53" target="_blank">delicious</a></li>\r\n</ul>\r\n<h2>Contacting Me</h2>\r\n<p>Drop me an email: gareth53[at]gmail.com.</p>',
      datetime.datetime(2009, 2, 4, 14, 15, 18), 1L, 3L, 4L),
     (4L, u'About The Site', u'about-this-site',
      u'<p>This site has been built using the Django Framework.</p>\r\n<p>There\'s a joke in the Django community that the very first thing a deveoper duils with the framework is a blogging application. Who am I to break this trend ;) There\'s no commenting. Because I had a blogspot blog and nobody ever commented on that, so I decided not to bother. There\'s a Django app that I might get around to installing one day. But not today.</p>\r\n<p>It\'s all hand-rolled, not because this is the right thing to do, but because it was a learning exercise.</p>\r\n<h2>Browser Support</h2>\r\n<p>This site has been successfully tested in the browers listed as A-grade browsers in Yahoo\'s Graded Browser Support Policy, although not all OS versions.</p>\r\n<p>This includes the following browsers on OSX 10.5.5 and Windows XP where available:</p>\r\n<ul>\r\n<li>Firefox 2 &amp; 3</li>\r\n<li>Opera 9</li>\r\n<li>Safari 3</li>\r\n<li>Internet Explorer 6 &amp; 7</li>\r\n</ul>\r\n<p>If you find a bug, be a love and let me know. Ta.</p>\r\n<h2>Some bits &amp; pieces</h2>\r\n<p>On the front end I\'m using (and heartily recommending):</p>\r\n<ul>\r\n<li>YUI Font Reset CSS</li>\r\n<li>jQuery</li>\r\n</ul>\r\n<p>I\'m also using the TinyMCE WYSIWYG plug-in for my admin, but it\'s glitchy as hell and I can\'t find my way to recommending it. Sorry!</p>\r\n<h2>Hosting</h2>\r\n<p>It\'s hosted by the fellas at <a href="http://www.webfaction.com" target="_blank">WebFaction</a>. I did fancy hosting it in the UK and I looked at <a href="http://www.mampi.co.uk/" target="_blank">Mampi Hosting</a>, but, in the end, I went down the tried and trusted (and cheap!) path.</p>\r\n<p><a href="http://djangofriendly.com/hosts/" target="_blank">DjangoFriendly.com</a> was instrumental in the process of shopping aound.</p>',
      datetime.datetime(2009, 2, 13, 14, 2, 33), 1L, 3L, 2L),
     (5L, u'About Nick & Gareth', u'about-nick-and-gareth',
      u'<p>Nick Peters was born in a crossfire hurricane.</p>\r\n<p>Gareth Senior used to work on the docks. Working nine to five, down on his luck, phew! that ws rough.</p>',
      datetime.datetime(2009, 2, 21, 13, 20, 53), 1L, 1L, 6L)),
    delete_ids=[1, 2, 3, 4, 5])
from gareth53.apps.dmigrations.mysql import migrations as m

migration = m.InsertRows(table_name='django_redirect',
                         columns=[u'id', u'site_id', u'old_path', u'new_path'],
                         insert_rows=(
                             (
                                 1L,
                                 1L,
                                 u'/podcast/episode001.html',
                                 u'/podcast/episode1-1.html',
                             ),
                             (
                                 2L,
                                 1L,
                                 u'/podcast/episode002.html',
                                 u'/podcast/episode1-2.html',
                             ),
                             (
                                 3L,
                                 1L,
                                 u'/podcast/episode003.html',
                                 u'/podcast/episode1-3.html',
                             ),
                             (
                                 4L,
                                 1L,
                                 u'/podcast/episode004.html',
                                 u'/podcast/episode1-4.html',
                             ),
                             (
                                 5L,
from gareth53.apps.dmigrations.mysql import migrations as m
import datetime
migration = m.InsertRows(
    table_name = 'podcast_album',
    columns = [u'id', u'album_artist_id', u'title', u'amazon_URL', u'slug', u'release_year', u'artwork'],
    insert_rows = ((1L, 1L, u'Songs About F*****g', u'', u'songs-about-f*****g', u'', u''),
 (2L, 2L, u'Figure 8', u'', u'figure-8', u'', u''),
 (3L, 4L, u'In Our Gun', u'', u'in-our-gun', u'', u''),
 (4L, 5L, u'Cold Water Songs', u'', u'cold-water-songs', u'', u''),
 (5L, 3L, u'Clear', u'', u'clear', u'1994', u''),
 (6L,
  56L,
  u'The Soft Bulletin',
  u'http://www.amazon.co.uk/Soft-Bulletin-Flaming-Lips/dp/B000025773/ref=sr_1_1?ie=UTF8&qid=1231677917&sr=8-1',
  u'the-soft-machine',
  u'1999',
  u''),
 (7L,
  30L,
  u'Dusk At Cubist Castle',
  u'http://www.amazon.co.uk/gp/product/B001LAC5WE/ref=dm_sp_alb?ie=UTF8&qid=1231678009&sr=8-1',
  u'dusk-at-cubist-castle',
  u'1996',
  u''),
 (8L, 29L, u'Smile EP', u'', u'smile-ep', u'', u''),
 (9L, 57L, u'Hypnotwister', u'', u'hypnotwister', u'1993', u''),
 (10L, 58L, u'Beautiful Mind EP', u'', u'beautiful-mind-ep', u'1999', u''),
 (11L,
  44L,
  u'Bring It Down',
  u'http://www.amazon.com/Bring-Down-Madder-Rose/dp/B000005WWT/ref=sr_1_1?ie=UTF8&s=music&qid=1231699062&sr=1-1',
示例#11
0
from gareth53.apps.dmigrations.mysql import migrations as m
import datetime
migration = m.InsertRows(
    table_name='blog_blogcategory',
    columns=[u'id', u'title', u'slug', u'use_count'],
    insert_rows=((1L, u'development', u'development', 30L), (2L, u'podcast',
                                                             u'podcast', 8L),
                 (3L, u'radio', u'radio', 1L), (4L, u'music', u'music', 2L),
                 (5L, u'personal', u'personal',
                  3L), (6L, u'film', u'film', 2L), (7L, u'rant', u'rant', 1L),
                 (8L, u'football', u'football',
                  1L), (9L, u'tellybox', u'tellybox', 1L), (10L, u'design',
                                                            u'design', 1L)),
    delete_ids=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
from gareth53.apps.dmigrations.mysql import migrations as m
import datetime
migration = m.InsertRows(
    table_name = 'articles_articlecategory',
    columns = [u'id', u'title', u'slug', u'description', u'pages_title', u'mainNavigation_id', u'footerNavigation_id'],
    insert_rows = ((1L, u'Podcast', u'podcast', u'', u'The Nick & Gareth Podcast', 3L, 4L),
 (2L, u'articles', u'articles', u'', u'gareth53', 1L, 2L),
 (3L, u'Master', u'test', u'', u'Gareth<span id="titleNo">53</span>', 1L, 2L)),
    delete_ids = [1, 2, 3]
)
示例#13
0
from gareth53.apps.dmigrations.mysql import migrations as m
import datetime

migration = m.InsertRows(
    table_name='podcast_tracklisting',
    columns=[u'id', u'track_number', u'track_id', u'episode_id'],
    insert_rows=((1L, 1L, 4L, 1L), (2L, 2L, 5L, 1L), (3L, 3L, 3L, 1L),
                 (4L, 4L, 6L, 1L), (5L, 5L, 1L, 1L), (6L, 6L, 2L, 1L),
                 (7L, 1L, 10L, 2L), (8L, 2L, 8L, 2L), (9L, 5L, 12L,
                                                       2L), (10L, 4L, 11L, 2L),
                 (11L, 3L, 9L, 2L), (12L, 6L, 7L, 2L), (13L, 1L, 23L, 3L),
                 (14L, 2L, 24L, 3L), (15L, 3L, 22L, 3L), (16L, 4L, 21L, 3L),
                 (17L, 5L, 20L, 3L), (18L, 6L, 19L, 3L), (19L, 1L, 13L, 4L),
                 (20L, 2L, 14L, 4L), (21L, 3L, 15L, 4L), (22L, 4L, 16L, 4L),
                 (23L, 5L, 17L, 4L), (24L, 6L, 18L, 4L), (25L, 1L, 30L, 5L),
                 (26L, 2L, 25L, 5L), (27L, 3L, 26L, 5L), (28L, 4L, 28L, 5L),
                 (29L, 5L, 29L, 5L), (30L, 6L, 27L, 5L), (31L, 1L, 31L, 6L),
                 (32L, 2L, 44L, 6L), (33L, 3L, 45L, 6L), (34L, 4L, 46L, 6L),
                 (35L, 5L, 47L, 6L), (36L, 6L, 48L, 6L), (37L, 1L, 32L, 7L),
                 (38L, 2L, 40L, 7L), (39L, 3L, 39L, 7L), (40L, 4L, 41L, 7L),
                 (41L, 5L, 42L, 7L), (42L, 6L, 43L, 7L), (43L, 1L, 38L, 8L),
                 (44L, 2L, 37L, 8L), (45L, 3L, 36L, 8L), (46L, 4L, 35L, 8L),
                 (47L, 5L, 34L,
                  8L), (48L, 6L, 33L,
                        8L), (49L, 1L, 49L,
                              9L), (50L, 2L, 50L,
                                    9L), (51L, 3L, 51L,
                                          9L), (52L, 4L, 52L,
                                                9L), (53L, 5L, 54L,
                                                      9L), (54L, 6L, 53L, 9L)),
    delete_ids=[