logo
Ask your Symfony questions! Pay money and get answers fast! (more info)

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.

$5
Symfony Doctrain Command

Symfony Doctrain Command

Nitin Barai | 03/23/11 at 1:36am Edit
Tutorial: How to assign prize money


(3) Responses

See a threaded view of answers?

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

  • avatar
    Last edited:
    03/24/11
    1:23am
    Loban Rahman says:

    I suspect you accidentally pressed "submit" before finishing typing. :-)

    Any symfony command-line command is done by running "./symfony ARGS" in the root folder of the symfony project. Just running "./symfony" with no arguments will give you a list of all possible commands and their quick description. For more details, do "./symfony help COMMAND". All the doctrine commands start with prefix "doctrine:".

  • avatar
    Last edited:
    03/24/11
    2:50am
    Deven Patel says:

    go to project directory root then:

    Now lets setup our database configuration in config/databases.yml. Open the file in your favorite editor and place the YAML below inside. For this test we are simply using a SQLite database. Doctrine is able to create the SQLite database at the config/doctrine.db path for you which we will do once we setup our schema and some data fixtures.

    all:
    doctrine:
    class: sfDoctrineDatabase
    param:
    dsn: sqlite:///< ?php echo dirname(__FILE__); ?>/doctrine.db

    ./symfony list doctrine
    it will display doctrin commands with short help

    -----------------------------------------------------
    $ ./symfony list doctrine
    Available tasks for the "doctrine" namespace:
    :build-all Generates Doctrine model, SQL and initializes the database (doctrine-build-all)
    :build-all-load Generates Doctrine model, SQL, initializes database, and load data (doctrine-build-all-load)
    :build-all-reload Generates Doctrine model, SQL, initializes database, and load data (doctrine-build-all-reload)
    :build-all-reload-test-all Generates Doctrine model, SQL, initializes database, load data and run all test suites (doctrine-build-all-reload-test-all)
    :build-db Creates database for current model (doctrine-build-db)
    :build-forms Creates form classes for the current model (doctrine-build-forms)
    :build-model Creates classes for the current model (doctrine-build-model)
    :build-schema Creates a schema.xml from an existing database (doctrine-build-schema)
    :build-sql Creates SQL for the current model (doctrine-build-sql)
    :data-dump Dumps data to the fixtures directory (doctrine-dump-data)
    :data-load Loads data from fixtures directory (doctrine-load-data)
    :dql Execute a DQL query and view the results (doctrine-dql)
    :drop-db Drops database for current model (doctrine-drop-db)
    :generate-crud Generates a Doctrine CRUD module (doctrine-generate-crud)
    :generate-migration Generate migration class (doctrine-generate-migration)
    :generate-migrations-db Generate migration classes from existing database connections (doctrine-generate-migrations-db, doctrine-gen-migrations-from-db)
    :generate-migrations-models Generate migration classes from an existing set of models (doctrine-generate-migrations-models, doctrine-gen-migrations-from-models)
    :init-admin Initializes a Doctrine admin module (doctrine-init-admin)
    :insert-sql Inserts SQL for current model (doctrine-insert-sql)
    :migrate Migrates database to current/specified version (doctrine-migrate)
    :rebuild-db Creates database for current model (doctrine-rebuild-db)

  • avatar
    Last edited:
    03/24/11
    11:12am
    Mike says:

    Hi,

    It's seems your question is incorrect.

    To view all commands for doctrine, enter this:

    php symfony list doctrine


This question has expired.





Current status of this question: Community pot



Please log in to add additional discourse to this page.





Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.