recreate database (erased by mistake) in Symfony - Doctrine?

i erased my database by mistake in phpmyadmin, i wanted to erase a table, but the whole thing has been erased. (i'm on symfony2) so i tried many things in the terminal :

php app/console doctrine:schema:create [PDOException] SQLSTATE[42000] [1049] Unknown database 'symfony' php symfony doctrine:create-db Could not open input file: symfony php symfony doctrine:build --all Could not open input file: symfony

but i can't manage to re-create the database, is there any way to do this?

Otherwise, i'll recreate a bundle etc. from the beginning, but if there's any other way...

Thanks

-------------Problems Reply------------

Run this command:

php app/console doctrine:database:create

Then you can now create your tables:

php app/console doctrine:schema:create

Category:database Views:1 Time:2012-02-28

Related post

  • Retrieve database names / dsn info from symfony / doctrine databases.yml 2011-09-11

    I have a complex data structure that means I have not been able to fully use relationships defined in schema.yml for my model. Now I have some reporting queries which need to use tables from several databases. Because of the complexity of the model t

  • symfony doctrine:build --all --and-load WITHOUT LOSING RECORDS IN DATABASE 2011-02-07

    I am new to Symfony+Doctrine, but fairly experienced with web application development in general (mostly using Zend Framework). I have started a new project using Symfony, and I'm loving it. I've got a handful of fixtures in my /data/fixtures/ folder

  • Preventing Doctrine from Dropping / Recreating Database When using build --all 2010-06-06

    The problem: I have a database that's running on a shared server. I do not have permission to drop/ create a database via the command line doctrine SQLSTATE[42000]: Syntax error or access violation: 1044 Access denied for user 'opnsrce'@'173.236.128.

  • Altering a database in symfony (doctrine) 2010-09-16

    I'm a beginner with symfony (1.4 + Doctrine), but there is a point which scares me. It seems that whenever one wants to change a model, the only way is to change the schema for the database (config/doctrine/schema.yml) and then call symphony doctrine

  • how to resolve symfony doctrine:build-schema error (Unknown relation alias table_name) 2009-10-26

    how to resolve this symfony error : C:\inetpub\wwwroot\project\trunk\preprod\signup>php symfony doctrine:build-schema --trace >> doctrine generating yaml schema from database [sfException] Unknown relation alias table_name Exception trace: a

  • Symfony doctrine:build-model errors 2010-11-07

    I have written my yaml schema for the database for my Symfony+doctrine application, and I'm trying to get it to make the models and such, but it errors on doctrine:build-model $> ./symfony doctrine:build-model >> doctrine generating model cl

  • unit testing with symfony + doctrine + PHPUnit 2009-09-10

    I'm working with Symfony + Doctrine + PHPUnit, with NetBeans IDE. Here' my current approach to unit testing. setUp() function loads the test fixtures from .yml files tearDown() function delete all data from models. this is done by looping through an

  • Standard idiom for adding new models to an app built on Symfony + Doctrine 2009-12-08

    What is the a standard way of adding new model to my app built on Symfony + Doctrine while maintaining all previous models and their meta-data (like relationships). What am I really looking for: A command / procedure that will be equivalent of ./scri

  • symfony doctrine build-sql error 2010-04-10

    I have some big problems with symfony and doctrine at the beginning of a new project. I have created database diagram with mysql workbench, inserted the sql into phpmyadmin and then I've tried symfony doctrine:build-schema to generate the YAML schema

  • symfony + doctrine + inheritance, how to make them work? 2010-05-05

    I am beginning to work with Symfony, I've found some documentation about inheritance. But also found this discouraging article, which make me doubt if Doctrine handles inheritance any good at all... Has anyone find a smart solution for inheritance in

  • Symfony doctrine i18n behavior data-load failure: Integrity constraint violation 2011-01-14

    I want tho have I18N categories table. I have followed the jobeet example. Schema and fixtures data below. ./symfony doctrine:build --db --all-classes --and-migrate ./symfony doctrine:data-load data/fixtures/category.yml When I run these commands no

  • Symfony doctrine and stored procedure 2011-01-27

    I try to learn symfony by this tutorial And is very good guide. But know im want to create stored procedure. And how i can describe procedures in shema yaml files? Because when i try to ./symfony doctrine:build --all -and-load - doctrine drop my data

  • How would I add cassandra support for symfony/doctrine? 2011-04-22

    Hey there, I want to use cassandra with symfony. It is my first time using both technologies. I have conducted a lot of research into what has already been done, and it seems like there is no support for cassandra from within symfony (which uses doct

  • Symfony doctrine::build task cannot create table named order 2011-04-25

    I have a database with a table named order. When i run php symfony doctrine:build --all, i got the folowing error: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your

  • Symfony+Doctrine migrations problems 2011-05-31

    I've got a strange problem with Symfony (with sfDoctrineGuardPlugin installed) and Doctrine migrations. What I've done till now: I've dropped database and created new one withou tables I've cleaned all model files I've cleared cache run symfony task

  • symfony doctrine:build --all 2011-08-29

    I have started to learn symfony and I am a little bit confused. In 'practical symfony' they explain symfony doctrine:build --model, symfony doctrine:build --sql and symfony doctrine:insert-sql but then they mention symfony doctrine:build -all without

  • symfony doctrine:generate-migrations-diff not creating version file 2011-08-31

    I already did some migrations with symfony 1.4, but for some reason, it's no longer working. I have my OLD model, and i added a brand new table to my schema.yml. When I write symfony doctrine:generate-migrations-diff i have the following ouput. >

  • symfony/doctrine getOrganisation() on employee returns a string (but I want an object) 2011-09-12

    I'm working on a project with symfony 1.4 & doctrine. 1.2 In my schema.yml I defined an employee and an organization entity: employee: tableName: employee columns: id: primary: true type: integer(8) notnull: true autoincrement: true organization:

  • How to setup multidatabase in symfony doctrine 2011-09-29

    i am using symfony for my project where i have two database, but i know only to setup symfony for single database, like below code database.yml all:doctrine: class: sfDoctrineDatabase param: dsn: mysql:host=localhost;dbname=gapi username: root passwo

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.092 (s). 11 q(s)