Skip to content

Commit 30ac070

Browse files
committed
bundles section updated for 2.5 and partial translations added
1 parent 14bbdd4 commit 30ac070

File tree

7 files changed

+247
-246
lines changed

7 files changed

+247
-246
lines changed

bundles/DoctrineMigrationsBundle/index.rst

Lines changed: 107 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
DoctrineMigrationsBundle
22
========================
33

4-
The database migrations feature is an extension of the database abstraction
5-
layer and offers you the ability to programmatically deploy new versions of
6-
your database schema in a safe, easy and standardized way.
4+
Lastnost migracije podatkovne baze je razširitev nivoja abstrakcije podatkovne
5+
baze in vam ponuja možnost programsko naložiti nove verzije
6+
sheme vaše podatkovne baze na varen, enostaven in standardiziran način.
77

88
.. tip::
99

10-
You can read more about the Doctrine Database Migrations on the project's
11-
`documentation`_.
10+
Več o migracijah podatkovnih baz Doctrine lahko preberete v projektni
11+
`dokumentaciji`_.
1212

13-
Installation
14-
------------
13+
Namestitev
14+
----------
1515

16-
Doctrine migrations for Symfony are maintained in the `DoctrineMigrationsBundle`_.
17-
The bundle uses external `Doctrine Database Migrations`_ library.
16+
Migracije Doctrine za Symfony so vzdrževane v `DoctrineMigrationsBundle`_.
17+
Paket uporablja zunanjo knjižnico `Doctrine Database Migrations`_.
1818

19-
Follow these steps to install the bundle and the library in the Symfony
20-
Standard edition. Add the following to your ``composer.json`` file:
19+
Sledite tem korakom, da namestite paket in knjižnico v Symfony
20+
standardno izdajo. Dodajte sledeče v vašo datoteko ``composer.json``:
2121

2222
.. code-block:: json
2323
@@ -28,23 +28,23 @@ Standard edition. Add the following to your ``composer.json`` file:
2828
}
2929
}
3030
31-
Update the vendor libraries:
31+
Posodobite knjižnice vendor:
3232

3333
.. code-block:: bash
3434
3535
$ php composer.phar update
3636
37-
If everything worked, the ``DoctrineMigrationsBundle`` can now be found
38-
at ``vendor/doctrine/doctrine-migrations-bundle``.
37+
Če je vse delovalo, je ``DoctrineMigrationsBundle`` sedaj na voljo
38+
v ``vendor/doctrine/doctrine-migrations-bundle``.
3939

4040
.. note::
4141

4242
``DoctrineMigrationsBundle`` installs
4343
`Doctrine Database Migrations`_ library. The library can be found
4444
at ``vendor/doctrine/migrations``.
4545

46-
Finally, be sure to enable the bundle in ``AppKernel.php`` by including the
47-
following:
46+
Na koncu se prepričajte, da ste omogočili paket v ``AppKernel.php`` z vključitvijo
47+
sledečega:
4848

4949
.. code-block:: php
5050
@@ -56,11 +56,11 @@ following:
5656
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
5757
);
5858
}
59-
60-
Configuration
61-
-------------
6259
63-
You can configure the path, namespace, table_name and name in your `config.yml`. The examples below are the default values.
60+
Nastavitve
61+
----------
62+
63+
Nastavite lahko pot, imenski prostor, ime tabele in ime v vaši ``config.yml``. Primeri spodaj so privzete vrednosti.
6464

6565
.. code-block:: yaml
6666
@@ -69,12 +69,12 @@ You can configure the path, namespace, table_name and name in your `config.yml`.
6969
dir_name: %kernel.root_dir%/DoctrineMigrations
7070
namespace: Application\Migrations
7171
table_name: migration_versions
72-
name: Application Migrations
72+
name: Application Migrations
7373
74-
Usage
75-
-----
74+
Uporaba
75+
-------
7676

77-
All of the migrations functionality is contained in a few console commands:
77+
Vsa funkcionalnost migracij je vsebovana v nekaj konzolnih ukazih:
7878

7979
.. code-block:: bash
8080
@@ -86,8 +86,8 @@ All of the migrations functionality is contained in a few console commands:
8686
:status View the status of a set of migrations.
8787
:version Manually add and delete migration versions from the version table.
8888
89-
Start by getting the status of migrations in your application by running
90-
the ``status`` command:
89+
Začnite s pridobitvijo statusa migracij v vaši aplikaciji s pogonom
90+
ukaza ``status``:
9191

9292
.. code-block:: bash
9393
@@ -106,17 +106,17 @@ the ``status`` command:
106106
>> Available Migrations: 0
107107
>> New Migrations: 0
108108
109-
Now, you can start working with migrations by generating a new blank migration
110-
class. Later, you'll learn how Doctrine can generate migrations automatically
111-
for you.
109+
Sedaj lahko začnete delati z migracijami z generiranjem novega praznega migracijskega
110+
razreda. Kasneje se boste naučili, kako lahko Doctrine generira migracije avtomatično
111+
za vas.
112112

113113
.. code-block:: bash
114114
115115
php app/console doctrine:migrations:generate
116116
Generated new migration class to "/path/to/project/app/DoctrineMigrations/Version20100621140655.php"
117117
118-
Have a look at the newly generated migration class and you will see something
119-
like the following::
118+
Poglejte novo generirani migracijski razred in videli boste nekaj,
119+
kot je sledeče::
120120

121121
namespace Application\Migrations;
122122

@@ -136,8 +136,8 @@ like the following::
136136
}
137137
}
138138

139-
If you run the ``status`` command it will now show that you have one new
140-
migration to execute:
139+
Če poženete ukaz ``status`` bo sedaj pokazal, da imate eno novo
140+
migracijo za izvršiti:
141141

142142
.. code-block:: bash
143143
@@ -160,45 +160,45 @@ migration to execute:
160160
161161
>> 2010-06-21 14:06:55 (20100621140655) not migrated
162162
163-
Now you can add some migration code to the ``up()`` and ``down()`` methods and
164-
finally migrate when you're ready:
163+
Sedaj lahko dodate nekaj kode migracije k metodam ``up()`` in ``down()`` ter
164+
končno migrirate, ko ste pripravljeni:
165165

166166
.. code-block:: bash
167167
168168
php app/console doctrine:migrations:migrate 20100621140655
169169
170-
For more information on how to write the migrations themselves (i.e. how to
171-
fill in the ``up()`` and ``down()`` methods), see the official Doctrine Migrations
172-
`documentation`_.
170+
Za več informacij, kako pisati same migracije (t.j. kako
171+
zapolniti metodi ``up()`` in ``down()``), glejte uradno
172+
`dokumentacijo`_ Doctrine migracije.
173173

174-
Running Migrations during Deployment
175-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
174+
Poganjanje migracij med razvojem
175+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
176176

177-
Of course, the end goal of writing migrations is to be able to use them to
178-
reliably update your database structure when you deploy your application.
179-
By running the migrations locally (or on a beta server), you can ensure that
180-
the migrations work as you expect.
177+
Seveda končni cilj pisanja migracij je, biti jih sposoben uporabiti, da
178+
zanesljivo posodobijo strukturo vaše podatkovne baze, ko nalagate vašo aplikacijo.
179+
S pogonom migracij lokalno (ali na beta strežniku), lahko zagotovite, da
180+
migracije delujejo, kot pričakujete.
181181

182-
When you do finally deploy your application, you just need to remember to run
183-
the ``doctrine:migrations:migrate`` command. Internally, Doctrine creates
184-
a ``migration_versions`` table inside your database and tracks which migrations
185-
have been executed there. So, no matter how many migrations you've created
186-
and executed locally, when you run the command during deployment, Doctrine
187-
will know exactly which migrations it hasn't run yet by looking at the ``migration_versions``
188-
table of your production database. Regardless of what server you're on, you
189-
can always safely run this command to execute only the migrations that haven't
190-
been run yet on *that* particular database.
182+
Ko končno naložite vašo aplikacijo, si morate samo zapomniti pognati
183+
ukaz ``doctrine:migrations:migrate``. Interno, Doctrine izdela
184+
tabelo ``migration_versions`` znotraj vaše podatkovne baze in beleži katere migracije
185+
so bile tam izvršene. Torej ne glede na to, koliko migracij ste ustvarili
186+
in izvršili lokalno, ko poženete ukaz med razvojem, bo Doctrine
187+
točno vedel, katere migracije še niso bile pognane s pogledom v tabelo
188+
``migration_versions`` vaše produkcijske baze. Ne glede na to, na katerem strežniku ste,
189+
lahko vedno varno poženete ta ukaz, da izvršite samo migracije, ki še niso bile
190+
pognane na *tisti* določeni podatkovni bazi.
191191

192-
Generating Migrations Automatically
193-
-----------------------------------
192+
Avtomatično generiranje migracij
193+
--------------------------------
194194

195-
In reality, you should rarely need to write migrations manually, as the migrations
196-
library can generate migration classes automatically by comparing your Doctrine
197-
mapping information (i.e. what your database *should* look like) with your
198-
actual current database structure.
195+
V realnosti bi morali redko potrebovati pisati migracije ročno, saj knjižnica
196+
migracij lahko generira razrede migracij avtomatično s primerjanjem vaših informacij Doctrine
197+
preslikav (t.j. kako bi vaša podatkovna baza *morala* izgledati) z vašo
198+
dejansko trenutno strukturo podatke baze.
199199

200-
For example, suppose you create a new ``User`` entity and add mapping information
201-
for Doctrine's ORM:
200+
Na primer, predpostavimo, da ste ustvarili novo entiteto ``User`` in dodali informacije preslikav
201+
za Doctrine-ov ORM:
202202

203203
.. configuration-block::
204204

@@ -261,43 +261,43 @@ for Doctrine's ORM:
261261
262262
</doctrine-mapping>
263263
264-
With this information, Doctrine is now ready to help you persist your new
265-
``User`` object to and from the ``hello_user`` table. Of course, this table
266-
doesn't exist yet! Generate a new migration for this table automatically by
267-
running the following command:
264+
S temi informacijami, Doctrine je sedaj pripravljen, da vam pomaga pridobiti vaš novi
265+
objekt ``User`` v in iz tabele ``hello_user``. Seveda ta tabela
266+
še ne obstaja! Generirajte novo migracijo za to tabelo avtomatično s
267+
pogonom sledečega ukaza:
268268

269269
.. code-block:: bash
270270
271271
php app/console doctrine:migrations:diff
272272
273-
You should see a message that a new migration class was generated based on
274-
the schema differences. If you open this file, you'll find that it has the
275-
SQL code needed to create the ``hello_user`` table. Next, run the migration
276-
to add the table to your database:
273+
Sedaj bi morali videti sporočilo, da je bil generiran razred nove migracije na osnovi
274+
razlik sheme. Če odprete to datoteko, boste ugotovili, da ima
275+
kodo SQL, ki je potrebna za ustvariti tabelo ``hello_user``. Naslednje poženite migracijo,
276+
da dodate tabelo vaši podatkovni bazi:
277277

278278
.. code-block:: bash
279279
280280
php app/console doctrine:migrations:migrate
281281
282-
The moral of the story is this: after each change you make to your Doctrine
283-
mapping information, run the ``doctrine:migrations:diff`` command to automatically
284-
generate your migration classes.
282+
Morala te zgodbe je: po vsaki spremembi, ki jo naredite vašim informacijam
283+
Doctrine preslikav, poženite ukaz ``doctrine:migrations:diff``, da avtomatično
284+
generirate vaše razrede migracij.
285285

286-
If you do this from the very beginning of your project (i.e. so that even
287-
the first tables were loaded via a migration class), you'll always be able
288-
to create a fresh database and run your migrations in order to get your database
289-
schema fully up to date. In fact, this is an easy and dependable workflow
290-
for your project.
286+
Če to delate od samega začetka vašega projekta (t.j. da celo
287+
ko so naložene prve tabele preko migracijskega razreda), boste vedno sposobni
288+
ustvariti svežo podatkovno bazo in pognati vaše migracije, da dobite shemo
289+
vaše podatkovne baze v celoti posodobljeno. V bistvu je to enostaven in odvisen potek dela
290+
za vaš projekt.
291291

292-
Container Aware Migrations
293-
--------------------------
292+
Migracije, ki se zavedajo kontejnerja
293+
-------------------------------------
294294

295-
In some cases you might need access to the container to ensure the proper update of
296-
your data structure. This could be necessary to update relations with some specific
297-
logic or to create new entities.
295+
V nekaterih primerih boste morda potrebovali dostop do kontejnerja, da zagovotite ustrezno posodobitev
296+
strukture vaše podatkovne baze. To je lahko potrebno za posodobitev relacij z nekatero določeno
297+
logiko ali ustvariti nove entitete.
298298

299-
Therefore you can just implement the ContainerAwareInterface with its needed methods
300-
to get full access to the container.
299+
Zato lahko samo implementirate ContainerAwareInterface z njegovimi potrebnimi metodami,
300+
da dobite celotni dostop do kontejnerja.
301301

302302
.. code-block:: php
303303
@@ -307,52 +307,52 @@ to get full access to the container.
307307
308308
class Version20130326212938 extends AbstractMigration implements ContainerAwareInterface
309309
{
310-
310+
311311
private $container;
312-
312+
313313
public function setContainer(ContainerInterface $container = null)
314314
{
315315
$this->container = $container;
316316
}
317-
317+
318318
public function up(Schema $schema)
319319
{
320320
// ... migration content
321321
}
322-
322+
323323
public function postUp(Schema $schema)
324324
{
325325
$em = $this->container->get('doctrine.orm.entity_manager');
326326
// ... update the entities
327327
}
328328
}
329329
330-
Manual Tables
331-
-------------
330+
Ročne tabele
331+
------------
332332

333-
It is a common use case, that in addition to your generated database structure
334-
based on your doctrine entities you might need custom tables. By default such
335-
tables will be removed by the doctrine:migrations:diff command.
333+
Pogosti primer uporabe je, da kot dodatek k strukturi vaše generirane podatkovne baze
334+
na osnovi vaših entitet doctrine, lahko potrebujete prilagoditi tabele. Privzeto bodo take
335+
tabele odstranjene z ukazom doctrine:migrations:diff.
336336

337-
If you follow a specific scheme you can configure doctrine/dbal to ignore those
338-
tables. Let's say all custom tables will be prefixed by ``t_``. In this case you
339-
just have to add the following configuration option to your doctrine configuration:
337+
Če sledite določeni shemi, lahko nastavite doctrine/dbal, da ignorira te
338+
tabele. Predpostavimo, da bodo vse tabele po meri imele predpono ``t_``. V tem primeru
339+
morate dodati samo naslednjo nastavitveno opcijo v vaše nastavitve doctrine:
340340

341341
.. configuration-block::
342342

343343
.. code-block:: yaml
344-
344+
345345
doctrine:
346-
dbal:
346+
dbal:
347347
schema_filter: ~^(?!t_)~
348-
348+
349349
.. code-block:: xml
350-
350+
351351
<doctrine:dbal schema-filter="~^(?!t_)~" ... />
352352
353-
353+
354354
.. code-block:: php
355-
355+
356356
$container->loadFromExtension('doctrine', array(
357357
'dbal' => array(
358358
'schema_filter' => '~^(?!t_)~',
@@ -361,11 +361,12 @@ just have to add the following configuration option to your doctrine configurati
361361
// ...
362362
));
363363
364-
This ignores the tables on the DBAL level and they will be ignored by the diff command.
364+
To ignorira tabele na nivoju DBAL in bodo ignorirane s strani ukaza diff.
365365

366-
Note that if you have multiple connections configured then the ``schema_filter`` configuration
367-
will need to be placed per-connection.
366+
Bodite pozorni, da če imate nastavljenih več povezav, potem bodo nastavitve ``schema_filter``
367+
potrebne za postaviti na povezavo.
368368

369-
.. _documentation: http://docs.doctrine-project.org/projects/doctrine-migrations/en/latest/index.html
369+
.. _dokumentacijo: http://docs.doctrine-project.org/projects/doctrine-migrations/en/latest/index.html
370+
.. _dokumentaciji: http://docs.doctrine-project.org/projects/doctrine-migrations/en/latest/index.html
370371
.. _DoctrineMigrationsBundle: https://github.com/doctrine/DoctrineMigrationsBundle
371372
.. _`Doctrine Database Migrations`: https://github.com/doctrine/migrations

0 commit comments

Comments
 (0)