Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use Propel\Generator\Manager\MigrationManager;
- /**
- * Data object containing the SQL and PHP code to migrate the database
- * up to version 1465748868.
- * Generated on 2016-06-12 18:27:48 by w
- */
- class PropelMigration_1465748868
- {
- public $comment = '';
- public function preUp(MigrationManager $manager)
- {
- // add the pre-migration code here
- }
- public function postUp(MigrationManager $manager)
- {
- // add the post-migration code here
- }
- public function preDown(MigrationManager $manager)
- {
- // add the pre-migration code here
- }
- public function postDown(MigrationManager $manager)
- {
- // add the post-migration code here
- }
- /**
- * Get the SQL statements for the Up migration
- *
- * @return array list of the SQL strings to execute for the Up migration
- * the keys being the datasources
- */
- public function getUpSQL()
- {
- return array (
- 'default' => '
- BEGIN;
- CREATE TABLE "product"
- (
- "id_product" bigserial NOT NULL,
- "id_product_barcode" INT8,
- "name" VARCHAR(200) NOT NULL,
- "id_product_manufacturer" INTEGER NOT NULL,
- "id_product_category" INTEGER NOT NULL,
- "id_product_photo" INT8,
- PRIMARY KEY ("id_product")
- );
- COMMENT ON TABLE "product" IS \'Available products table\';
- COMMIT;
- ',
- );
- }
- /**
- * Get the SQL statements for the Down migration
- *
- * @return array list of the SQL strings to execute for the Down migration
- * the keys being the datasources
- */
- public function getDownSQL()
- {
- return array (
- 'default' => '
- BEGIN;
- DROP TABLE IF EXISTS "product" CASCADE;
- COMMIT;
- ',
- );
- }
- }
Add Comment
Please, Sign In to add comment