def METHOD_NAME():
    # custom
    op.drop_constraint("projects_nodes_pkey", "projects_nodes", type_="primary")
    op.create_primary_key("projects_nodes_pkey", "projects_nodes", ["node_id"])
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(
        "fk_projects_to_projects_nodes_to_projects_uuid",
        "projects_nodes",
        type_="foreignkey",
    )
    op.drop_column("projects_nodes", "project_uuid")
    op.create_table(
        "projects_to_projects_nodes",
        sa.Column("project_uuid", sa.VARCHAR(), autoincrement=False, nullable=True),
        sa.Column("node_id", sa.VARCHAR(), autoincrement=False, nullable=True),
        sa.Column(
            "created",
            postgresql.TIMESTAMP(timezone=True),
            server_default=sa.text("now()"),
            autoincrement=False,
            nullable=False,
        ),
        sa.Column(
            "modified",
            postgresql.TIMESTAMP(timezone=True),
            server_default=sa.text("now()"),
            autoincrement=False,
            nullable=False,
        ),
        sa.ForeignKeyConstraint(
            ["node_id"],
            ["projects_nodes.node_id"],
            name="fk_projects_to_projects_nodes_to_projects_nodes_node_id",
            onupdate="CASCADE",
            ondelete="CASCADE",
        ),
        sa.ForeignKeyConstraint(
            ["project_uuid"],
            ["projects.uuid"],
            name="fk_projects_to_projects_nodes_to_projects_uuid",
            onupdate="CASCADE",
            ondelete="CASCADE",
        ),
        sa.UniqueConstraint(
            "project_uuid",
            "node_id",
            name="projects_to_projects_nodes_project_uuid_node_id_key",
        ),
    )
    # ### end Alembic commands ###
    # custom
    op.execute(delete_orphaned_project_nodes_procedure)
    op.execute(projects_to_projects_nodes_deleted_trigger)