snipt

Ctrl+h for KB shortcuts

YAML

symfony database yml config

all:
  propel: #database name in schema.xml
    class:                sfPropelDatabase
    param:
      phptype:            mysql     # Database vendor
      hostspec:           localhost
      database:           blog
      username:           login
      password:           passwd
      encoding:           utf8      # Default charset for table creation
      persistent:         true      # Use persistent connections
https://snippets.siftie.com/embed/8ab42f8174c2696ae2f186e6bb7a1eec/
/raw/8ab42f8174c2696ae2f186e6bb7a1eec/
8ab42f8174c2696ae2f186e6bb7a1eec
yaml
YAML
11
2019-03-25T18:24:44
True
False
False
/api/public/snipt/2546/
symfony-database-yml-config
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1"> 1</a> <a href="#L-2"> 2</a> <a href="#L-3"> 3</a> <a href="#L-4"> 4</a> <a href="#L-5"> 5</a> <a href="#L-6"> 6</a> <a href="#L-7"> 7</a> <a href="#L-8"> 8</a> <a href="#L-9"> 9</a> <a href="#L-10">10</a> <a href="#L-11">11</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="l l-Scalar l-Scalar-Plain">all</span><span class="p p-Indicator">:</span> </span><span id="L-2"><a name="L-2"></a> <span class="l l-Scalar l-Scalar-Plain">propel</span><span class="p p-Indicator">:</span> <span class="c1">#database name in schema.xml</span> </span><span id="L-3"><a name="L-3"></a> <span class="l l-Scalar l-Scalar-Plain">class</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">sfPropelDatabase</span> </span><span id="L-4"><a name="L-4"></a> <span class="l l-Scalar l-Scalar-Plain">param</span><span class="p p-Indicator">:</span> </span><span id="L-5"><a name="L-5"></a> <span class="l l-Scalar l-Scalar-Plain">phptype</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">mysql</span> <span class="c1"># Database vendor</span> </span><span id="L-6"><a name="L-6"></a> <span class="l l-Scalar l-Scalar-Plain">hostspec</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">localhost</span> </span><span id="L-7"><a name="L-7"></a> <span class="l l-Scalar l-Scalar-Plain">database</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">blog</span> </span><span id="L-8"><a name="L-8"></a> <span class="l l-Scalar l-Scalar-Plain">username</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">login</span> </span><span id="L-9"><a name="L-9"></a> <span class="l l-Scalar l-Scalar-Plain">password</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">passwd</span> </span><span id="L-10"><a name="L-10"></a> <span class="l l-Scalar l-Scalar-Plain">encoding</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">utf8</span> <span class="c1"># Default charset for table creation</span> </span><span id="L-11"><a name="L-11"></a> <span class="l l-Scalar l-Scalar-Plain">persistent</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">true</span> <span class="c1"># Use persistent connections</span> </span></pre></div> </td></tr></table>
config, mysql, symfony, yml