/*
 * Licensed to Jasig under one or more contributor license
 * agreements. See the NOTICE file distributed with this work
 * for additional information regarding copyright ownership.
 * Jasig licenses this file to you under the Apache License,
 * Version 2.0 (the "License"); you may not use this file
 * except in compliance with the License.  You may obtain a
 * copy of the License at the following location:
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

package io.cos.cas.adaptors.postgres.models;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * The Open Science Framework API OAuth2 Personal Access Token.
 *
 * @author Michael Haselton
 * @author Longze Chen
 * @since 4.1.0
 */
@Entity
@Table(name = "osf_apioauth2personaltoken")
public class OpenScienceFrameworkApiOauth2PersonalAccessToken {

    @Id
    @Column(name = "id", nullable = false)
    private Integer id;

    @Column(name = "token_id", nullable = false)
    private String tokenId;

    @Column(name = "name", nullable = false)
    private String name;

    @Column(name = "scopes", nullable = false)
    private String scopes;

    @Column(name = "is_active", nullable = false)
    private Boolean isActive;

    @OneToOne
    @JoinColumn(name = "owner_id")
    private OpenScienceFrameworkUser owner;

    /** Default Constructor.*/
    public OpenScienceFrameworkApiOauth2PersonalAccessToken() {}

    public Integer getId() {
        return id;
    }

    public String getTokenId() {
        return tokenId;
    }

    public String getName() {
        return name;
    }

    public String getScopes() {
        return scopes;
    }

    public Boolean isActive() {
        return isActive;
    }

    public OpenScienceFrameworkUser getOwner() {
        return owner;
    }

    @Override
    public String toString() {
        return String.format("PersonalAccessToken [id=%s, owner=%s]", id, owner.getUsername());
    }
}

@@ -1173,17 +1173,17 @@
 nce 4.1.
-0
+5
 %0A */%0A@En
@@ -1525,83 +1525,8 @@
 e;%0A%0A
-    @Column(name = %22scopes%22, nullable = false)%0A    private String scopes;%0A%0A
     
@@ -1938,24 +1938,24 @@
 getName() %7B%0A
+
         retu
@@ -1974,70 +1974,8 @@
  %7D%0A%0A
-    public String getScopes() %7B%0A        return scopes;%0A    %7D%0A%0A
     

Remove scopes from the PAT model