{"id":18981415,"url":"https://github.com/awncorp/moodle","last_synced_at":"2026-05-03T07:46:23.090Z","repository":{"id":77256542,"uuid":"300957284","full_name":"awncorp/moodle","owner":"awncorp","description":"Mojo DB Driver Migrations","archived":false,"fork":false,"pushed_at":"2020-10-03T20:36:02.000Z","size":42,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-04T17:53:38.312Z","etag":null,"topics":["database","ddl","migrations","perl","perl5"],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/awncorp.png","metadata":{"files":{"readme":"README","changelog":"CHANGES","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-03T19:06:27.000Z","updated_at":"2022-07-24T20:59:29.000Z","dependencies_parsed_at":"2023-02-27T09:31:21.001Z","dependency_job_id":null,"html_url":"https://github.com/awncorp/moodle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/awncorp/moodle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awncorp%2Fmoodle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awncorp%2Fmoodle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awncorp%2Fmoodle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awncorp%2Fmoodle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/awncorp","download_url":"https://codeload.github.com/awncorp/moodle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awncorp%2Fmoodle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32562118,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","ddl","migrations","perl","perl5"],"created_at":"2024-11-08T16:09:47.145Z","updated_at":"2026-05-03T07:46:23.070Z","avatar_url":"https://github.com/awncorp.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"NAME\n\n    Moodle\n\nABSTRACT\n\n    Mojo DB Driver Migrations\n\nSYNOPSIS\n\n      # migration: step #1\n    \n      package Migration::Step1;\n    \n      use parent 'Doodle::Migration';\n    \n      no warnings 'redefine';\n    \n      sub up {\n        my ($self, $doodle) = @_;\n    \n        my $table = $doodle-\u003etable('users');\n        $table-\u003eprimary('id');\n        $table-\u003ecreate;\n    \n        return $doodle;\n      }\n    \n      sub down {\n        my ($self, $doodle) = @_;\n    \n        my $table = $doodle-\u003etable('users');\n        $table-\u003edelete;\n    \n        return $doodle;\n      }\n    \n      # migration: step #2\n    \n      package Migration::Step2;\n    \n      use parent 'Doodle::Migration';\n    \n      no warnings 'redefine';\n    \n      sub up {\n        my ($self, $doodle) = @_;\n    \n        my $table = $doodle-\u003etable('users');\n        $table-\u003estring('email')-\u003ecreate;\n    \n        return $doodle;\n      }\n    \n      sub down {\n        my ($self, $doodle) = @_;\n    \n        my $table = $doodle-\u003etable('users');\n        $table-\u003estring('email')-\u003edelete;\n    \n        return $doodle;\n      }\n    \n      # migration: root\n    \n      package Migration;\n    \n      use parent 'Doodle::Migration';\n    \n      sub migrations {[\n        'Migration::Step1',\n        'Migration::Step2',\n      ]}\n    \n      # main program\n    \n      package main;\n    \n      use Moodle;\n    \n      my $self = Moodle-\u003enew(\n        driver =\u003e $main::driver,\n        migrator =\u003e Migration-\u003enew\n      );\n    \n      # $self-\u003emigrate;\n\nDESCRIPTION\n\n    This package uses Doodle with Mojo database drivers to easily install\n    and evolve database schema migrations. See Doodle::Migration for help\n    setting up Doodle migrations, and Mojo::Pg, Mojo::mysql or Mojo::SQLite\n    for help configuring DB drivers.\n\nLIBRARIES\n\n    This package uses type constraints from:\n\n    Moodle::Library\n\nATTRIBUTES\n\n    This package has the following attributes:\n\n driver\n\n      driver(Driver)\n\n    This attribute is read-only, accepts (Driver) values, and is required.\n\n migrator\n\n      migrator(Migrator)\n\n    This attribute is read-only, accepts (Migrator) values, and is\n    required.\n\nMETHODS\n\n    This package implements the following methods:\n\n content\n\n      content() : Str\n\n    This method generates DB migration statements returning a string\n    containing \"UP\" and \"DOWN\" versioned migration strings suitable for use\n    with the migration feature of Mojo database drivers.\n\n    content example #1\n\n        # given: synopsis\n      \n        my $content = $self-\u003econtent;\n\n migrate\n\n      migrate(Maybe[Str] $target) : Object\n\n    This method uses the DB migration statements generated by the \"content\"\n    method and installs them using the Mojo database driver. This method\n    returns a migration object relative to the DB driver used.\n\n    migrate example #1\n\n        # given: synopsis\n      \n        my $migrate = $self-\u003emigrate;\n\nAUTHOR\n\n    Al Newkirk, awncorp@cpan.org\n\nLICENSE\n\n    Copyright (C) 2011-2019, Al Newkirk, et al.\n\n    This is free software; you can redistribute it and/or modify it under\n    the terms of the The Apache License, Version 2.0, as elucidated in the\n    \"license file\"\n    \u003chttps://github.com/iamalnewkirk/moodle/blob/master/LICENSE\u003e.\n\nPROJECT\n\n    Wiki \u003chttps://github.com/iamalnewkirk/moodle/wiki\u003e\n\n    Project \u003chttps://github.com/iamalnewkirk/moodle\u003e\n\n    Initiatives \u003chttps://github.com/iamalnewkirk/moodle/projects\u003e\n\n    Milestones \u003chttps://github.com/iamalnewkirk/moodle/milestones\u003e\n\n    Contributing\n    \u003chttps://github.com/iamalnewkirk/moodle/blob/master/CONTRIBUTE.md\u003e\n\n    Issues \u003chttps://github.com/iamalnewkirk/moodle/issues\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawncorp%2Fmoodle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fawncorp%2Fmoodle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawncorp%2Fmoodle/lists"}