This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

gregorybleiker8797
gregorybleiker8797

Hi I messed up my OctoberCMS DB by tinkering around in it and would like to have a fresh start, so I tried php artisan october:down, but this gives me an error:


[gbl@gbl-vb-linux octobercms]$ php artisan october:down
**************************************************
*     This will DESTROY all database tables.     *
**************************************************

Do you really wish to run this command? [y/N] y

  [Doctrine\DBAL\Schema\SchemaException]                  
  There is no column with name 'phone' on table 'users'.  

Shouldn't this work if you wan't to recreate the DB tables? The message about destroying certainly suggests it. Any ideas how to get back to a working DB?

Any help appreciated.

webmaster
webmaster

Before doing my solution get backup from all files & databases.

  1. Install Composer

  2. save following content to composer.json
    
    {
    "name": "october/october",
    "description": "October CMS",
    "homepage": "http://octobercms.com",
    "keywords": ["october", "cms", "octobercms", "laravel"],
    "authors": [
        {
            "name": "Alexey Bobkov",
            "email": "aleksey.bobkov@gmail.com",
            "role": "Co-founder"
        },
        {
            "name": "Samuel Georges",
            "email": "daftspunky@gmail.com",
            "role": "Co-founder"
        }
    ],
    "support": {
        "issues": "https://github.com/octobercms/october/issues",
        "forum": "http://octobercms.com/forum/",
        "docs": "http://octobercms.com/docs/",
        "irc": "irc://irc.freenode.net/october",
        "source": "https://github.com/octobercms/october"
    },
    "require": {
        "php": ">=5.4",
        "october/rain": "~1.0",
        "october/system": "~1.0",
        "october/backend": "~1.0",
        "october/cms": "~1.0",
        "laravel/framework": "5.0.*",
        "illuminate/html": "5.0.*"
    },
    "require-dev": {
        "phpunit/phpunit": "~4.0",
        "phpunit/phpunit-selenium": ">=1.2"
    },
    "autoload-dev": {
        "classmap": [
            "tests/TestCase.php",
            "tests/UiTestCase.php"
        ]
    },
    "scripts": {
        "post-create-project-cmd": [
            "php artisan key:generate"
        ]
    },
    "config": {
        "preferred-install": "dist"
    },
    "minimum-stability": "dev",
    "prefer-stable": true
    }
    
  3. go to root directory from terminal and run composer update
  4. run php artisan october:down

it seems you removed some other requirements on your update/installation process! hope it's be your solution.

Last updated

gregorybleiker8797
gregorybleiker8797

Hi webmaster Thanks for your help! I commented out the autoload-dev section, because it was throwing exceptions and the composer update ran smoothly.

Unfortunately doing this did not change anything, the output of october:down is still the same... Any other ideas?

webmaster
webmaster

mmm, Actually, Something like this occur to me download and transfer plugins to new location and it's work well. in addition previous reply do following things to new location:

  • cloning octobercms github repository (previous reply)
  • Tranfer plugins directory from previous location to new location.
  • edit config/database.php contents and set your previous mysql database credentials.

finaly. send your result here. :)

gregorybleiker8797
gregorybleiker8797

Hi webmaster Thanks for your help. I moved the whole plugins dir and then the down and up worked! Alternatively I found that I could just recreate an empty sqlite3 file and just do the up part... The problems were caused by the rainlab.user plugin, which doesn't check for existance of tables or columns in the down section. If I get round to it I will send a pull request.

maxDubovsky
maxDubovsky

I'm interested in resolving this issue. I have troubles updating RainLab.User plugin it is throwing an error:

[Doctrine\DBAL\Schema\SchemaException]
There is no column with name 'username' on table 'users'.

Of course I have username column inside the users table.

maxDubovsky
maxDubovsky

After reinstalling RainLab.User plugin nothing changed. But I dropped column username manualy in DB and added column again. Also added 'login' column just in case and after refreshing plugin it worked.

1-7 of 7

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.