Example #1
0
def deploy():
    db.drop_all()
    db.create_all()
    coldplay = Artist(name='Edward Hartono', about='MIS')
    maroon5 = Artist(name='Mark Serva', about='MIS')
    db.session.add(coldplay)
    db.session.add(maroon5)
    db.session.commit()
Example #2
0
def deploy():
    db.drop_all()
    db.create_all()
    coldplay = Artist(name='Coldplay', about='Coldplay is a British rock band.')
    maroon5 = Artist(name='Maroon 5', about='Maroon 5 is an American pop rock band.')
    song1= Song(name='yellow', year=2004, lyrics= 'bla bla', artist= coldplay)
    db.session.add(coldplay)
    db.session.add(maroon5)
    db.session.add(song1)
    db.session.commit()
Example #3
0
def deploy():
    db.drop_all()
    db.create_all()
    coldplay = Artist(name='Coldplay',
                      about='Coldplay is a British rock band.')
    maroon5 = Artist(name='Maroon 5',
                     about='Maroon 5 is an American pop rock band.')
    db.session.add(coldplay)
    db.session.add(maroon5)
    db.session.commit()
Example #4
0
def deploy():
    db.drop_all()
    db.create_all()
    coldplay = Artist(name='Junbo Son', about='Junbo is a Business Analytics teacher.')
    maroon5 = Artist(name='Diane Wright', about='Diane Wright is a MISY160 teacher.')
    song1 = Song(name='BUAD345', year=2017, lyrics="Analytics and Visualization", artist=coldplay)
    song2 = Song(name='MISY160', year=2016, lyrics="Intro to Business Information Systems", artist=maroon5)
    db.session.add(coldplay)
    db.session.add(maroon5)
    db.session.add(song1)
    db.session.add(song2)
    db.session.commit()
Example #5
0
def deploy():
    db.drop_all()
    db.create_all()
    GNR = Artist(name='Guns and Roses',
                 about='Guns and Roses is my favorite band')
    PinkFloyd = Artist(name='Pink Floyd',
                       about='Pink Floyd is one of the top rock bands.')
    song1 = Song(name='Sweet Child o Mine',
                 year=1987,
                 lyrics="She's got a smile",
                 artist=GNR)
    song2 = Song(name='Money',
                 year=1973,
                 lyrics="Money, Get away",
                 artist=PinkFloyd)
    db.session.add(GNR)
    db.session.add(PinkFloyd)
    db.session.add(song1)
    db.session.add(song2)
    db.session.commit()
Example #6
0
def deploy():
    db.drop_all()
    db.create_all()
    coldplay = Artist(name='Coldplay',
                      about='Coldplay is a British rock band.')
    maroon5 = Artist(name='Maroon 5',
                     about='Maroon 5 is an American pop rock band.')
    song1 = Song(name='Yellow',
                 year=2000,
                 lyrics="Look at the stars",
                 artist=coldplay)
    song2 = Song(name='Yellow2',
                 year=2000,
                 lyrics="Look at the stars2",
                 artist=coldplay)
    db.session.add(coldplay)
    db.session.add(maroon5)
    db.session.add(song1)
    db.session.add(song2)
    db.session.commit()
Example #7
0
def deploy():
    db.drop_all()
    db.create_all()
    Harry = Professor(name='Harry', department='Accounting & MIS')
    Professor_Hubert = Professor(name='Professor Hubert', department='Mathematics')
    Skip = Professor(name='Skip', department='Accounting & MIS')
    Professor_Davis = Professor(name="Professor Davis", department= "Finance")
    course1 = Course(number='MISY350', title="Application Development", description= "JS,CSS,HTML,GitHub,Python", professor=Harry)
    course2 = Course(number='BUAD447', title="Data Analysis Quality Control", description="Statistical approach to operations management", professor=Professor_Hubert)
    course3 = Course(number='BUAD446', title="Operations and Supply Chains", description="Learn about planning and contol in operations management", professor=Professor_Davis)
    course4 = Course(number='MISY430', title="Systems Analysis and Implementation", description="Further your knowledge in database design and application concepts", professor=Skip)
    db.session.add(Harry)
    db.session.add(Professor_Hubert)
    db.session.add(Skip)
    db.session.add(Professor_Davis)
    db.session.add(course1)
    db.session.add(course2)
    db.session.add(course3)
    db.session.add(course4)
    db.session.commit()
Example #8
0
def deploy():
    db.drop_all()
    db.create_all()
    coldplay = Artist(name='Coldplay',
                      about='Coldplay is a British rock band.')
    maroon5 = Artist(name='Maroon 5',
                     about='Maroon 5 is an American pop rock band.')
    song1 = Song(name='Yellow',
                 year=2004,
                 lyrics='yeah, yeah,yeah',
                 artist=coldplay)
    song2 = Song(name='Sugar',
                 year=2014,
                 lyrics="I'm hurting, baby, I'm broken down",
                 artist=maroon5)
    db.session.add(coldplay)
    db.session.add(maroon5)
    db.session.add(song1)
    db.session.add(song2)
    db.session.commit()
Example #9
0
def deploy():
    print("resetting database")
    db.drop_all()
    db.create_all()

    print("inserting initial data")
    rowling = Author(name="JK Rowling", about="this is jk rowling")
    austin = Author(name="Jane Austin", about="this is jane")
    lee = Author(name="Harper Lee", about="this is harper")
    potter = Song(name='Harry Potter', year=1997, author=rowling)
    pride = Song(name='Pride and Prejudice', year=1813, author=austin)
    mockingbird = Song(name='To Kill a Mockingbird', year=1960, author=lee)

    db.session.add(rowling)
    db.session.add(austin)
    db.session.add(lee)
    db.session.add(potter)
    db.session.add(pride)
    db.session.add(mockingbird)

    db.session.commit()