Update Guide

Update id 3af71ba

Note: If you are installing the script for the first time you don't need to apply this update.

Important: We are not going to update your application, ever time a new update is released. You have to update it yourself own. So keep the backup copy always.

What's New

Actual List of files modified in this update

How to update

Before update make sure to create backup of both files and database ( ! Important )

This update require some database changes to create backup of database

app/artvenue
app/controllers
app/views
app/models
app/database
app/library
app/lang
app/routes.php
app/filters.php
public/static
Route::get('update', function () {

    if (Schema::hasTable('categories')) {
        return 'Already Updated';
    }

    Artisan::call('migrate');
    DB::table('categories')->insert(array(
        array('name' => 'Uncategorized', 'slug' => 'uncategorized')
    ));

    Schema::table('users', function ($table) {
           $table->string('remember_token')->nullable()->after('email_favorite');
    });

    Schema::table('images', function ($table) {
        $table->integer('category_id')->default(1)->unsigned()->after('image_description');
    });

    $category = DB::table('sitecategories')->get();

    foreach ($category as $cat) {
        $newcategory = new Category;
        $newcategory->name = $cat->category;
        $newcategory->slug = $cat->slug;
        $newcategory->save();
        $images = Images::where('category', '=', $cat->slug)->get();
        foreach ($images as $image) {
            $image->category_id = $newcategory->id;
            $image->save();
        }
    }

    Schema::drop('sitecategories');
    Schema::table('images', function ($table) {
        $table->dropColumn('category');
    });

    File::cleanDirectory(app_path() . '/storage/cache');
    File::cleanDirectory(app_path() . '/storage/views');
    return 'Success';
});

Some tips