Skip to content

[SOLVED] change the user model #333

Answered by datamweb
l-vanel asked this question in Q&A
Aug 2, 2022 · 4 comments · 13 replies
Discussion options

You must be logged in to vote

Hi @l-vanel,
Thank you for registering your question again in this section.

  1. Create a migration file in path app\Database\Migrations\AddCustomColumnForUser with the following content:
<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

// Add custom column for shield
class AddCustomColumnForUser extends Migration
{
    public function up()
    {
        
        $fields = [
            "gender SET('male', 'female', 'bisexual') NULL DEFAULT NULL COMMENT 'gender user'",
            'first_name' => [
                'type'       => 'text',
                'constraint' => '50',
                'null'       => TRUE
            ],
            'last_name' => [
      …

Replies: 4 comments 13 replies

Comment options

You must be logged in to vote
7 replies
@datamweb
Comment options

@solomon-ochepa
Comment options

@solomon-ochepa
Comment options

@kenjis
Comment options

@kenjis
Comment options

Answer selected by l-vanel
Comment options

You must be logged in to vote
4 replies
@datamweb
Comment options

@l-vanel
Comment options

@datamweb
Comment options

@datamweb
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@datamweb
Comment options

@l-vanel
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants