Git Product home page Git Product logo

Comments (4)

takeit avatar takeit commented on July 29, 2024

Hi @shivharis do you get any error?

from web-publisher.

shivharis avatar shivharis commented on July 29, 2024

Here:

==> default: > loading [0] SWP\Bundle\FixturesBundle\DataFixtures\ORM\LoadUsersData
==> default: > loading [1] SWP\Bundle\FixturesBundle\DataFixtures\ORM\LoadArticlesData
==> default: 00:04:42 ERROR [console] Error thrown while running command "doctrine:fixtures:load --no-debug --no-interaction". Message: "An exception occurred while executing 'INSERT INTO swp_package (id, headline, slugline, guid, evolved_from, byline, language, description, subjects, services, keywords, places, type, located, source, ed_note, genre, pub_status, urgency, priority, version, body, enabled, extra, first_published_at, created_at, updated_at, deleted_at, status, organization_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [1, "headline1", "abstract-html-test1", "urn:newsml:localhost:2016-09-23T13:56:39.404843:56465de4-0d5c-495a-8e36-3b396def3cf0", null, null, "en", null, "a:0:{}", "a:0:{}", "a:0:{}", "a:0:{}", "text", null, null, null, "N;", "usable", 1, 2, 1, null, 1, "N;", null, "2019-01-18 00:04:42", "2019-01-18 00:04:42", null, "new", 1]:
==> default:
==> default: SQLSTATE[42703]: Undefined column: 7 ERROR: column "first_published_at" of relation "swp_package" does not exist
==> default: LINE 1: ...urgency, priority, version, body, enabled, extra, first_publ...
==> default: ^" ["exception" => Doctrine\DBAL\Exception\InvalidFieldNameException { …},"command" => "doctrine:fixtures:load --no-debug --no-interaction","message" => """ An exception occurred while executing 'INSERT INTO swp_package (id, headline, slugline, guid, evolved_from, byline, language, description, subjects, services, keywords, places, type, located, source, ed_note, genre, pub_status, urgency, priority, version, body, enabled, extra, first_published_at, created_at, updated_at, deleted_at, status, organization_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [1, "headline1", "abstract-html-test1", "urn:newsml:localhost:2016-09-23T13:56:39.404843:56465de4-0d5c-495a-8e36-3b396def3cf0", null, null, "en", null, "a:0:{}", "a:0:{}", "a:0:{}", "a:0:{}", "text", null, null, null, "N;", "usable", 1, 2, 1, null, 1, "N;", null, "2019-01-18 00:04:42", "2019-01-18 00:04:42", null, "new", 1]:\n \n SQLSTATE[42703]: Undefined column: 7 ERROR: column "first_published_at" of relation "swp_package" does not exist\n LINE 1: ...urgency, priority, version, body, enabled, extra, first_publ...\n ^ """] []
==> default: In AbstractPostgreSQLDriver.php line 80:
==> default:
==> default: An exception occurred while executing 'INSERT INTO swp_package (id, headlin
==> default: e, slugline, guid, evolved_from, byline, language, description, subjects, s
==> default: ervices, keywords, places, type, located, source, ed_note, genre, pub_statu
==> default: s, urgency, priority, version, body, enabled, extra, first_published_at, cr
==> default: eated_at, updated_at, deleted_at, status, organization_id) VALUES (?, ?, ?,
==> default:
==> default: ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
==> default: ?, ?)' with params [1, "headline1", "abstract-html-test1", "urn:newsml:loc
==> default: alhost:2016-09-23T13:56:39.404843:56465de4-0d5c-495a-8e36-3b396def3cf0", nu
==> default: ll, null, "en", null, "a:0:{}", "a:0:{}", "a:0:{}", "a:0:{}", "text", null,
==> default: null, null, "N;", "usable", 1, 2, 1, null, 1, "N;", null, "2019-01-18 00:0
==> default: 4:42", "2019-01-18 00:04:42", null, "new", 1]:
==> default:
==> default: SQLSTATE[42703]: Undefined column: 7 ERROR: column "first_published_at" of
==> default: relation "swp_package" does not exist
==> default: LINE 1: ...urgency, priority, version, body, enabled, extra, first_publ...
==> default:

from web-publisher.

shivharis avatar shivharis commented on July 29, 2024

Pull request:
#704

from web-publisher.

shivharis avatar shivharis commented on July 29, 2024

Above mentioned pull request #704 is minimalistic - just to get by for now.

True migration that brings the DB in sync should be as below, but never know what it may break (only extensive testing will tell):

(snapshot of "up" changes, "down" is not included for brevity)

    $this->addSql('DROP SEQUENCE request_metrics_id_seq CASCADE');
    $this->addSql('DROP TABLE request_metrics');
    $this->addSql('ALTER TABLE swp_route ALTER paywall_secured DROP DEFAULT');
    $this->addSql('ALTER TABLE swp_widget ALTER created_at SET DEFAULT \'now\'');
    $this->addSql('ALTER TABLE swp_rule ALTER organization_id SET NOT NULL');
    $this->addSql('ALTER TABLE swp_package ADD first_published_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');
    $this->addSql('ALTER TABLE swp_package ALTER organization_id SET NOT NULL');
    $this->addSql('ALTER TABLE swp_package ALTER genre TYPE TEXT');
    $this->addSql('ALTER TABLE swp_package ALTER genre DROP DEFAULT');
    $this->addSql('ALTER TABLE swp_article ALTER extra SET NOT NULL');
    $this->addSql('ALTER TABLE swp_article ALTER paywall_secured DROP DEFAULT');
    $this->addSql('ALTER TABLE swp_container ALTER created_at SET DEFAULT \'now\'');
    $this->addSql('ALTER TABLE swp_publish_destination ALTER package_guid SET NOT NULL');
    $this->addSql('ALTER TABLE swp_publish_destination ALTER paywall_secured DROP DEFAULT');
    $this->addSql('ALTER TABLE swp_output_channel DROP CONSTRAINT FK_AFE4D08F9033212A');
    $this->addSql('ALTER TABLE swp_output_channel ADD CONSTRAINT FK_AFE4D08F9033212A FOREIGN KEY (tenant_id) REFERENCES swp_tenant (id) ON DELETE SET NULL NOT DEFERRABLE INITIALLY IMMEDIATE');

from web-publisher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.