Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dump database data using Doctrine 2

Is it possible to dump a database using doctrine 2? I have read that symfony has a library which extends doctrine to do it but How could I use it in my zendframework project with Bisna Doctrine 2 Integration?

like image 488
dextervip Avatar asked Jan 30 '12 22:01

dextervip


People also ask

What is doctrine database?

The Doctrine Project is the home to several PHP libraries primarily focused on database storage and object mapping. The core projects are the Object Relational Mapper (ORM) and the Database Abstraction Layer (DBAL) it is built upon. Get Started View Projects.

What is doctrine repository?

A repository in a term used by many ORMs (Object Relational Mappers), doctrine is just one of these. It means the place where our data can be accessed from, a repository of data. This is to distinguish it from a database as a repository does not care how its data is stored.

What is doctrine Symfony?

Symfony provides all the tools you need to use databases in your applications thanks to Doctrine, the best set of PHP libraries to work with databases. These tools support relational databases like MySQL and PostgreSQL and also NoSQL databases like MongoDB.

What is Symfony repository?

A repository is a way to retrieve entities, so put on repositories any method you need to get them, such as getUserByEmail or whatever.


1 Answers

For Symfony2:

Type

php app/console doctrine:schema:create --dump-sql

in the command line

like image 162
Amit Avatar answered Oct 07 '22 01:10

Amit