Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Introspection] error: Argument 'value' is missing in attribute '@default'. #1865

Closed
janpio opened this issue Mar 18, 2020 · 1 comment
Closed
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. topic: introspection
Milestone

Comments

@janpio
Copy link
Member

janpio commented Mar 18, 2020

For example mariadb/coppermine_stderr.log:

"error: Argument 'value' is missing in attribute '@default'.
  -->  schema.prisma:228
   | 
227 |   user_email                   String                      @default('')
228 |   user_email_valid             copp_users_user_email_valid @default()
   | 

Validation Error Count: 1
"

Model and Enum:

model copp_users {
  user_active                  copp_users_user_active      @default(NO)
  user_actkey                  String                      @default("")
  user_email                   String                      @default("")
  user_email_valid             copp_users_user_email_valid @default()
  user_group                   Int                         @default(2)
  user_group_list              String                      @default("")
  user_id                      Int                         @default(autoincrement()) @id
  user_language                String                      @default("")
  user_lastvisit               DateTime                    @default(dbgenerated())
  user_name                    String                      @default("") @unique
  user_password                String                      @default("")
  user_password_hash_algorithm String                      @default("")
  user_password_iterations     String                      @default("")
  user_password_salt           String                      @default("")
  user_profile1                String                      @default("")
  user_profile2                String                      @default("")
  user_profile3                String                      @default("")
  user_profile4                String                      @default("")
  user_profile5                String                      @default("")
  user_profile6                String
  user_regdate                 DateTime                    @default(dbgenerated())

  @@index([user_group], name: "user_group")
}

enum copp_users_user_email_valid {
  YES
  
}

SQL:

CREATE TABLE `copp_users` (
  `user_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_group` int(11) NOT NULL DEFAULT '2',
  `user_active` enum('YES','NO') COLLATE latin1_german2_ci NOT NULL DEFAULT 'NO',
  `user_name` varchar(25) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
  `user_password` varchar(255) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
  `user_password_salt` varchar(255) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
  `user_password_hash_algorithm` varchar(25) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
  `user_password_iterations` varchar(25) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
  `user_lastvisit` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `user_regdate` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `user_group_list` varchar(255) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
  `user_email_valid` enum('YES','') COLLATE latin1_german2_ci NOT NULL DEFAULT '',
  `user_profile1` varchar(255) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
  `user_profile2` varchar(255) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
  `user_profile3` varchar(255) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
  `user_profile4` varchar(255) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
  `user_profile5` varchar(255) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
  `user_profile6` text COLLATE latin1_german2_ci NOT NULL,
  `user_actkey` varchar(32) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
  `user_language` varchar(40) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`user_id`),
  UNIQUE KEY `user_name` (`user_name`),
  KEY `user_group` (`user_group`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci COMMENT='Used to store users, not used when bridged';
@janpio janpio added bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. topic: introspection labels Mar 18, 2020
@janpio janpio added this to the Preview 25 milestone Mar 18, 2020
@janpio
Copy link
Member Author

janpio commented Mar 18, 2020

Duplicate of #1852

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. topic: introspection
Projects
None yet
Development

No branches or pull requests

2 participants