<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
    xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
    xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd
                        http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">

    <!--
        Added the entity ContentPage.
    -->
    <changeSet id="20250416090000-1" author="omg">
        <createTable tableName="content_page" remarks="Content Page stores HTML pages.">
          <column name="id" type="bigint" autoIncrement="true" startWith="1">
          	<constraints primaryKey="true" nullable="false"/>
          </column>
          
	      <column name="slug" type="varchar(50)">
	        <constraints nullable="false" unique="true"/>
	      </column>
	
		  <column name="title" type="varchar(512)">
	        <constraints nullable="false"/>
	      </column>
	      
	      <column name="html_content" type="longtext">
	        <constraints nullable="false"/>
	      </column>
	             
          <column name="version" type="integer" defaultValueNumeric="-1" remarks="Record version for concurrency control.">
              <constraints nullable="false" />
          </column> 
        </createTable>
    </changeSet>

	<changeSet id="20250416090000-2" author="omg">
	    <insert tableName="content_page">
	        <column name="title" value="Home Page Anónimo"/>
	        <column name="slug" value="HOME_ANONYMOUS"/>
	        <column name="html_content" value="&lt;h1&gt;Home Page Anónimo&lt;/h1&gt;"/>
	        <column name="version" value="0"/>
	    </insert>
	    
	    <insert tableName="content_page">
	        <column name="title" value="Home Page Autenticado"/>
	        <column name="slug" value="HOME_AUTHENTICATED"/>
	        <column name="html_content" value="&lt;h1&gt;Home Page Autenticado&lt;/h1&gt;"/>
	        <column name="version" value="0"/>
	    </insert>
	</changeSet>
</databaseChangeLog>
